.TH rsh "" "" "Command"
.PC "Run a command under the shell on a remote host"
\fBrsh \fIhost \fB[\fIcommand \fB[\fIargument ...\^\fB] ]\fR"
.PP
The command
.B rsh
runs
.I command
under a shell on the remote
.IR host .
You must have an account on both your local host and the remote
.IR host ,
and both accounts must have the same login identifier.
.PP
.B rsh
passes every
.IR argument ,
should there be any, to
.IR command .
It connects your terminal to the standard input and output of
.IR command .
For example, the command
.DM
	rsh mwcmail ls /usr/spool/uucp/lepanto
.DE
.PP
executes command
.B "ls /usr/spool/uucp/lepanto"
under a shell on remote host
.BR mwcmail ,
which shows you what files have been queued for uploading to system
.BR lepanto .
.PP
.B rsh
passes to the shell on the remote system all wildcard characters and
redirection operators that your local shell does not interpret.
For example, the command
.DM
	rsh lepanto ls /v/fwb/doc > localfile
.DE
.PP
reads the contents of directory
.B /v/fwb/doc
on system
.B lepanto
and writes them into file
.B localfile
on your local system.
However, the command
.DM
	rsh lepanto ls /v/fwb/doc '>' remotefile
.DE
.PP
writes the contents of
.B /v/fwb/doc
into file
.B remotefile
in your home directory on the remote system.
.PP
If you invoke
.B rsh
without a
.IR command ,
it attempts to log you into
.IR host ,
just as if you had invoked the command
.BR rlogin .
.SH "See Also"
.B
commands,
rcp,
rlogin,
rshd
.R
