VMS Help
TCPIP Services, Remote Commands, RSH
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
The RSH (Remote Shell) command connects your terminal to a remote
host and requests it to execute the command, script, or command
procedure that you specify. If the command generates output,
you see it as if it were produced locally. If you omit a remote
command when you enter an RSH command line, RSH initiates an
RLOGIN session. However, if the command line includes /PASSWORD,
the remote login attempt fails. Using the /PASSWORD qualifier
invokes REXEC.
Syntax rules require that you enter your RSH command line so that
the remote command is the last word (or phrase).
Quotation Marks
If the remote command is one or more lowercase words, you do not
need to enclose them in double quotation marks on the RSH command
line. However, double quotation marks ( " " ) are required for:
o UNIX commands that are mixed-case characters.
o UNIX commands that are uppercase characters.
In addition, RSH handles one double quotation mark ( " ) and two
consecutive double quotation marks ( "" ) as follows:
o If you input one double quotation mark in a command line, RSH
removes it.
o If you enter two consecutive double quotation marks on the
command line, RSH removes the first quotation mark and leaves
the second.
o If you surround text with a set of double quotation marks on
the RSH command line, RSH disables the default conversion of
characters to lowercase, and removes the quotation marks.
Interrupting Commands
To stop a remote execution, enter either Ctrl/C or Ctrl/Y.
The following examples show how to use the RSH command.
1. In this 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 quotes 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
$ RSH DEBTS "echo '""test"" message'"
"test" message
4. Because no remote command is specified on the RSH command
line, DIGITAL TCP/IP Services for OpenVMS executes RLOGIN.
$ RSH MOON01 <Return>
Password: (password not echoed)<Return>
Last successful login for jjones: Fri Sep 25 10:58:31 1998 from nebula
Last unsuccessful login for jjones: Fri Sep 25 11:59:43 1998 on ttyp5
Digital UNIX V5.0 (Rev. 148); Tue Apr 7 18:32:54 EST 1998
Digital Equipment Corporation
Internal Use Only
moon01>
5. In this example, the OpenVMS system manager of 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 WR2.
$ RSH WR2 DIRECTORY
6. In this example, the OpenVMS system manager of WR2 previously
created an entry in the authentication files for remote user
SIMMS on host WR1 allowing SIMMS access to the user name
ROGERS.
User SIMMS enters the DIRECTORY command from WR1 to execute at
WR2 in user account ROGERS.
$ RSH WR2 /USER=ROGERS DIRECTORY
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.