OpenWindows Advanced User's Guide

9.4 Executing Commands Remotely (rsh)

The rsh command (for remote shell) lets you execute a single command on a remote machine without having to log in formally. It can be a real time-saver when you know you only want to do one thing on the remote machine.

To execute a command on a remote machine, type:

rsh machinename command

The following example shows how you would view the contents of the directory /home/lonesome/guitar on the machine lonesome:

$ rsh lonesome ls /home/lonesome/guitar
collings         gibson          santacruz
fender           martin          taylor
$ 

Similar to the rlogin and rcp commands, rsh uses the remote machine's /etc/hosts.equiv and /etc/passwd files to determine whether you have unchallenged access privileges.

For more information on the rsh(1) command and its options, refer to the man Pages(1): User Commands.