Previous Section  < Day Day Up >  Next Section

rsh—starts a remote shell


rsh [ –n ] [ –l username ] hostname command

rsh hostname [ –n ] [ –l username ] command


rsh connects to the specified hostname and executes the specified command. rsh 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 normally terminates when the remote command does. If a command is not given, then rsh logs you on to the remote host using rlogin.

Example A.47.

1   rsh bluebird ps -ef

2   rsh -l john owl ls; echo $PATH;cat .profile


EXPLANATION

  1. Connects to machine bluebird and displays all processes running on that machine.

  2. Goes to the remote machine owl as user john and executes all three commands.

    Previous Section  < Day Day Up >  Next Section