Solaris Advanced User's Guide

Executing Commands Remotely (rsh)

The rsh command (for remote shell) enables you to execute a single command on a remote machine without having to log in to the remote machine. If you know you only want to do one thing on a remote machine, rsh enables you to quickly execute one command on a remote machine.

To execute a command on a remote machine, use the following command syntax.

rsh machinename  command 

The following example shows how you would view the contents of the directory /etc/skel on the machine starbug.

venus$ rsh starbug ls /etc/skel*

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 to the remote machine.

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