/etc/hosts
krsh1
Remote shell
Usage
rsh [-45FGKdefnuxz]
[-U
string]
[-p
port]
[-l
username]
[{-P
N | O}]
host
[command]
Overview
rsh authenticates to the rshd(8) daemon on the remote host, and then executes the specified command.
rsh copies its standard input to the remote command, and the standard output and error of the remote command to its own.
Valid options are:
-
-4,--krb4The-4option requests Kerberos 4 authentication. Normally all supported authentication mechanisms will be tried, but in some cases more explicit control is desired. -
-5,--krb5The-5option requests Kerberos 5 authentication. This is analogous to the-4option. -
-K,--brokenThe-Koption turns off all Kerberos authentication. The security in this mode relies on reserved ports. The long name is an indication of how good this is. -
-n,--no-inputThe-noption directs the input from the /dev/null device (see the BUGS section of this manual page). -
-d -
Enable setsockopt(2) socket debugging.
-
-e,--no-stderrDon't use a separate socket for the stderr stream. This can be necessary if rsh-ing through a NAT bridge. -
-x,--encryptThe-xoption enables encryption for all data exchange. This is only valid for Kerberos authenticated connections (see the BUGS section for limitations). -
-zThe opposite of-x. This is the default, and is mainly useful if encryption has been enabled by default, for instance in the appdefaults section of /etc/krb5.conf when using Kerberos 5. -
-f,--forwardForward Kerberos 5 credentials to the remote host. Also settable via appdefaults (see krb5.conf). -
-F,--forwardableMake the forwarded credentials re-forwardable. Also settable via appdefaults (see krb5.conf). -
-lstring,--user=string By default the remote username is the same as the local. The-loption or the username@host format allow the remote name to be specified. -
-n,--no-inputDirect input from /dev/null (see the BUGS section). -
-pnumber-or-service,--port=number-or-service Connect to this port instead of the default (which is 514 when using old port based authentication, 544 for Kerberos 5 and non-encrypted Kerberos 4, and 545 for encrytpted Kerberos 4; subject of course to the contents of /etc/services). -
-PN|O|1|2,--protocol=N|O|1|2 Specifies the protocol version to use with Kerberos 5. N and 2 select protocol version 2, while O and 1 select version 1. Version 2 is believed to be more secure, and is the default. Unless asked for a specific version,rshwill try both. This behaviour may change in the future. -
-u,--uniqueMake sure the remote credentials cache is unique, that is, don't reuse any existing cache. Mutually exclusive to-U. -
-Ustring,--tkfile=string Name of the remote credentials cache. Mutually exclusive to-u. -
-x,--encryptThe-xoption enables encryption for all data exchange. This is only valid for Kerberos authenticated connections (see the BUGS section for limitations). -
-z -
The opposite of
-x. This is the default, but encryption can be enabled when using Kerberos 5, by setting the libdefaults/encrypt option in krb5.conf(5).
Examples
Care should be taken when issuing commands containing shell meta characters. Without quoting, these will be expanded on the local machine.
The following command:
rsh otherhost cat remotefile localfile
will write the contents of the remote remotefile to the local localfile, but:
rsh otherhost 'cat remotefile remotefile2'
will write it to the remote remotefile2.
Files
Releases
5 releases since Debian 3.1 (Sarge); the text changed 4 times.
-d since Debian 5.0 (Lenny);
-z since Debian 5.0 (Lenny).
--encrypt until Debian 4.0 (Etch);
--help until Debian 4.0 (Etch);
--login until Debian 4.0 (Etch);
--noforward until Debian 4.0 (Etch);
--quiet until Debian 4.0 (Etch);
--verbose until Debian 4.0 (Etch);
--version until Debian 4.0 (Etch);
-K until Debian 3.1 (Sarge);
-V until Debian 4.0 (Etch);
-f until Debian 4.0 (Etch);
-h until Debian 4.0 (Etch);
-k until Debian 3.1 (Sarge);
-l until Debian 4.0 (Etch);
-n until Debian 3.1 (Sarge);
-q until Debian 4.0 (Etch);
-v until Debian 4.0 (Etch);
-x until Debian 4.0 (Etch).