heimdal-rsh (1) Linux Manual Page
NAME
rsh – remote shell
SYNOPSIS
[-45FGKdefnuxz ] [-U string ] [-p port ] [-l username ] [-P N|O ] host [command]
DESCRIPTION
authenticates to the rshd(8) daemon on the remote host and then executes the specified command
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–-krb4 -
- The –
4option requests Kerberos 4 authentication. Normally all supported authentication mechanisms will be tried, but in some cases more explicit control is desired. - The –
- –
5–-krb5 -
- The –
5option requests Kerberos 5 authentication. This is analogous to the –4option. - The –
- –
K–-broken -
- The –
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. - The –
- –
n–-no-input -
- The –
noption directs the input from the /dev/null device (see the Sx BUGS section of this manual page). - The –
-d- Enable setsockopt(2) socket debugging.
- –
e–-no-stderr -
- Don’t use a separate socket for the stderr stream. This can be necessary if rsh-ing through a NAT bridge.
- –
x–-encrypt -
- The –
xoption enables encryption for all data exchange. This is only valid for Kerberos authenticated connections (see the Sx BUGS section for limitations). - The –
- –
z -
- The opposite of –
xThis is the default, and is mainly useful if encryption has been enabled by default, for instance in theappdefaultssection of /etc/krb5.conf when using Kerberos 5. - The opposite of –
- –
f–-forward -
- Forward Kerberos 5 credentials to the remote host. Also settable via
appdefaults(see krb5.conf). - Forward Kerberos 5 credentials to the remote host. Also settable via
- –
F–-forwardable -
- Make the forwarded credentials re-forwardable. Also settable via
appdefaults(see krb5.conf). - Make the forwarded credentials re-forwardable. Also settable via
- –
lstring –-user=string -
- By default the remote username is the same as the local. The –
loption or the username [at] host format allow the remote name to be specified. - By default the remote username is the same as the local. The –
- –
n–-no-input -
- Direct input from /dev/null (see the Sx 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, will try both. This behaviour may change in the future.
- –
u–-unique -
- Make sure the remote credentials cache is unique, that is, don’t reuse any existing cache. Mutually exclusive to –
U - Make sure the remote credentials cache is unique, that is, don’t reuse any existing cache. Mutually exclusive to –
- –
U string–-tkfile= string -
- Name of the remote credentials cache. Mutually exclusive to –
u - Name of the remote credentials cache. Mutually exclusive to –
- –
x–-encrypt -
- The –
xoption enables encryption for all data exchange. This is only valid for Kerberos authenticated connections (see the Sx BUGS section for limitations). - The –
-z- The opposite of –
xThis is the default, but encryption can be enabled when using Kerberos 5, by setting thelibdefaults/encryptoption in krb5.conf5.
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
/etc/hosts
SEE ALSO
rlogin(1), krb_realmofhost3, krb_sendauth3, hosts.equiv5, krb5.conf5, rhosts(5), kerberos(8) rshd(8)
HISTORY
The command appeared in BSD 4.2
AUTHORS
This implementation of was written as part of the Heimdal Kerberos 5 implementation.
BUGS
Some shells (notably csh(1)) will cause to block if run in the background, unless the standard input is directed away from the terminal. This is what the –n option is for.
The –x options enables encryption for the session, but for both Kerberos 4 and 5 the actual command is sent unencrypted, so you should not send any secret information in the command line (which is probably a bad idea anyway, since the command line can usually be read with tools like ps(1)). Forthermore in Kerberos 4 the command is not even integrity protected, so anyone with the right tools can modify the command.
