remsh(1C) TCP/IP 5.4.2 remsh(1C)
NAME
remsh, rsh - create a remote shell to execute a command
SYNOPSIS
remsh host [ -l username ] [ -n ] [ command ]
rsh host [ -l username ] [ -n ] [ command ]
DESCRIPTION
Use this command (remsh, which might be called rsh on your system) to
connect with a remote host:
host specifies the name of the remote host.
-l username
optionally specifies the login name to use on the remote
host. If you omit this parameter, the local username is
used on the remote host as well.
-n optionally specifies that input should be redirected to
/dev/null. If you omit this parameter, remsh copies its
standard input to the remote command.
command optionally specifies a batch command to execute on the
remote system. If you omit this parameter, rlogin(1C) is
executed on the remote system.
If you use the optional command parameter, note these points:
* You cannot supply an interactive command, such as vi. To execute
an interactive command on the remote system, first log in to the
remote system: use remsh(1C) with no command parameter, or
rlogin(1C). Then type the interactive command's name.
* Your startup file (.login or .profile) is not executed as it is
with rlogin(1C). (If you use the C shell, the .cshrc file is
executed.) Thus, any environment variables that are set in your
startup file (for example: TZ, PATH) will not get set for command.
The default path is /usr/bin.
The remsh command 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 passed to the remote
command; remsh normally terminates when the remote command does.
Hosts are specified in the file /etc/hosts. For each host, one or
more optional nicknames may be given.
The /etc/hosts.equiv file, maintained by the system administrator,
controls remote access at the system level. The optional file
.rhosts, in each user's directory, controls remote access at the user
level. See hosts.equiv(4) for details.
CAUTION: If users from different systems listed in the
Licensed material--property of copyright holder(s) 1
remsh(1C) TCP/IP 5.4.2 remsh(1C)
/etc/hosts.equiv file have the same user ID, they will have
access to each other's accounts.
Unquoted shell metacharacters are interpreted on the local machine,
whereas quoted metacharacters are interpreted on the remote machine.
Thus, the command:
remsh otherhost cat remotefile >> localfile
appends the remote file remotefile to the local file localfile,
whereas:
remsh otherhost cat remotefile ">>" otherremotefile
appends remotefile to otherremotefile.
FILES
/etc/hosts, /etc/hosts.equiv
SEE ALSO
rlogin(1C), rshd(1M), hosts.equiv(4M).
on(1C) in ONC/NFS.
BUGS
If you are using csh(1) and put an remsh in the background without
redirecting its input away from the terminal, the command will block
even if no reads are posted by the remote command. To avoid this
problem, use the -n option to redirect unwanted input from remsh to
/dev/null.
Stop signals stop the local remsh process only.
Licensed material--property of copyright holder(s) 2