Library /sys$common/syshlp/helplib.hlb  —  TCPIP Services, Remote Commands, RSH  Examples
    The following examples show how to use the RSH command.

    1. In the first example, the remote system manager previously
       created an entry in the authentication files for remote user
       STAN on host oster, giving STAN permission to access user
       rolly.

       From the local OpenVMS host, user STAN views rolly's
       directory, which resides on UNIX system oster. No quotation
       marks are required around the user name and host name because
       RSH by default sends them in lowercase.

       $ RSH /USER_NAME=ROLLY OSTER LS

    2. On the following RSH command line, the uppercase UNIX
       qualifier -R is entered within quotation marks to preserve the
       uppercase R. This example assumes that the user's originating
       host and user name are in the authentication files on the
       remote host debts.

       $ RSH DEBTS LS "-R"

    3. The following commands show how RSH sends quotation marks to
       a remote UNIX host and how quotation marks affect case. All
       examples assume that the user's originating host and user name
       are in the authentication files on the remote host.

       $ RSH DEBTS ECHO TEST MESSAGE
       test message

       $ RSH DEBTS ECHO "\""test\"" message"
       "test" message

       RSH DEBTS ECHO "TEST" MESSAGE
       TEST message

       $ RSH DEBTS "echo '""test"" message'"
       "test" message

    4. Because a remote command is not specified on the RSH command
       line, TCP/IP Services executes RLOGIN.

       $ RSH MOON01

       Password:     <Return>(password not echoed)

       Last successful login for jjones: Fri Sep 25 10:58:31 2003 from nebula
           Last unsuccessful login for jjones: Fri Sep 25 11:59:43 2003 on ttyp5

           Tru64 UNIX V5.0  (Rev. 148); Tue Apr  7 18:32:54 EST 2003

                               Compaq Computer Corporation
                                    Internal Use Only
       moon01>

    5. In this example, the OpenVMS system manager of host WR2
       previously created an entry in the authentication files for
       remote user SIMMS on host WR1.

       From OpenVMS host WR1, user SIMMS enters the DIRECTORY command
       to execute at host WR2.

       $ RSH WR2 DIRECTORY

    6. In this example, the OpenVMS system manager of host WR2
       previously created an entry in the authentication files for
       remote user SIMMS on host WR1, allowing user SIMMS access to
       the user name ROGERS.

       User SIMMS enters the DIRECTORY command from host WR1 to
       execute at host WR2 in user account ROGERS.

       $ RSH WR2 /USER=ROGERS DIRECTORY
Close Help