rsh

NAME

rsh - remote shell

SYNOPSIS

rsh [-Ddn] [-l username] host [command]

DESCRIPTION

The rsh(1) utility executes command on host. The host name can be specified in either name or numeric dot notation.

The rsh(1) utility copies its standard input to the remote command, the standard output of the remote command to its standard output, and the standard error of the remote command to its standard error. Interrupt, quit, and terminate signals are propagated to the remote command; rsh(1) normally terminates when the remote command does.

The options are as follows:

-D
The -D option prefixes both the remote and local user names with the user's Windows domain name. (By default, both remote and local user names are the user name without the domain.) The argument to the -l option will always override the remote user name value. This option should only be used when connecting with another Interix system.
-d
The -d option turns on socket debugging (using setsockopt(3)) on the transmission control protocol (TCP) sockets used for communication with the remote host.
-l
By default, the remote user name is the same as the local user name. The -l option allows the remote name to be specified. Kerberos authentication is used, and authorization is determined as in rlogin(1).
-n
The -n option redirects input from the special device /dev/null (see the BUGS section later in this topic).

If no command is specified, you will be logged in on the remote host using rlogin(1).

Shell metacharacters that are not quoted are interpreted on local computer; quoted metacharacters are interpreted on the remote computer. For example, the following command:

$ rsh otherhost cat remotefile >> localfile

appends the remote file remotefile to the local file localfile.

Using the following:

rsh otherhost cat remotefile ">>" other_remotefile

appends remotefile to other_remotefile.

Interix authentication

On traditional systems, a user can run a command using rsh(1) on a system identified in the user's .rhosts file without providing a password. This is because on a traditional system, the rshd(1) program is run as the superuser, and can take any login identity. This might or might not work on an Interix system, because of differences in the user authentication mechanism:

FILES

%WINDIR%/system32/drivers/etc/hosts
The list of hosts.

BUGS

If you are using csh(1) and put a rsh(1) in the background without redirecting its input away from the terminal, it will block even if no read operations are posted by the remote command. If you do not want input, redirect the input of rsh(1) to /dev/null using the -n option.

You cannot run an interactive command (like rogue(1) or vi(1)) using rsh(1); use rlogin(1) instead.

Stop signals stop the local rsh(1) process only. Although this is arguably wrong, it is difficult to fix.

SEE ALSO

rlogin(1)

iruserok(3)

rcmd(3)