DIGITAL TCP/IP Services for OpenVMS
User's Guide


Previous | Contents

Note that you can also use TELNET to log into remote internet hosts. To determine the best remote login service to use for your needs, see Section 1.1.2. For more information about TELNET, see Chapter 5.

4.5.1 Logging Out

End your remote login session in either of two ways:

The default escape character is a tilde ( ~ ). To set another escape character, use the /ESCAPE_CHARACTER qualifier on the RLOGIN command line.

4.5.2 Example RLOGIN Sessions

The following examples show how to use the RLOGIN command.

  1. The following command logs into node CONDO:
    $ RLOGIN CONDO [Return] 
     
    OpenVMS Version 6.2 -- Unauthorized access is prohibited. 
    Username: KING [Return] 
    Password:           (not echoed) [Return]
     
    $ RUN ... 
    $ ~. (not echoed) 
    %RSH-S-LCLCLOSED, Local connection closed 
    $ 
    
  2. The following command logs into host petrel and sets the character used to close the RLOGIN session:
    $ RLOGIN /ESCAPE_CHARACTER="+" PETREL [Return]
       .
       .
       .
    Last login: Mon Mar 14 18:34:27 from phoebe.edu 
    UNIX System petrel:  Fri Mar 19 11:02:20 EST 1997 
    Mon Jun 28 18:44:42 EST 1997 
     
    % ls ... [Return]
    % +. (not echoed) 
    %RSH-S-LCLCLOSED, Local connection closed 
    $ 
    

4.6 Issuing a Remote Command with RSH

The RSH 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 type 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. (See Section 4.7.)

Syntax rules require that you type your RSH command line so that the remote command is the last word (or phrase).

4.6.1 Quotation Marks in Commands

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:

In addition, RSH handles one double quotation mark ( " ) and two consecutive double quotation marks ( "" ) as follows:

4.6.2 Interrupting a Command's Execution

To stop a remote execution, enter either Ctrl/C or Ctrl/Y.

4.6.3 Example RSH Commands

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 typed 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 TANNER [Return] 
    Password:               (not echoed)[Return] 
     
    Last login: Wed Aug 24 07:14:28 from henson.pension.daily.com 
               DIGITAL UNIX Mon Aug 29 17:27:15 EDT 1997 
     
                        Daily Corporation 
     
    today> 
    
  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 types 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 issues the DIRECTORY command from WR1 to execute at WR2 in user account ROGERS.
    $ RSH WR2 /USER=ROGERS DIRECTORY 
    

4.7 Issuing a Remote Command with a Password (REXEC Feature)

Use the REXEC feature to send a command to execute on a remote host that does not have, or might not have, the authentication information that RSH requires. The remote system's authentication files are not used.

Along with the remote command, REXEC sends the password you specify on the command line to the remote host. This password is used for security checking.

The Remote Shell program invokes REXEC. To use REXEC, issue RSH /PASSWORD.

4.7.1 Example REXEC Use

The following example shows how to provide password information for the RSH command, thereby invoking the REXEC feature on the remote host.

From host GRANT, user STANTON types the file tops.holdings that resides on UNIX host oster. Because STANTON is not listed in oster's authentication files, user STANTON must use the REXEC feature and supply the /USER_NAME and /PASSWORD qualifiers. Quotes are required around the password because it contains uppercase letters.

$ RSH OSTER /USER_NAME=STANTON /PASSWORD="KeepingSaneJoy" - 
_$ CAT TOPS.HOLDINGS 

4.8 Command Descriptions

This section provides complete descriptions of each R command. Included with each command description is the UNIX-style equivalent of the command. These equivalents are valid on UNIX systems only. They are presented here for users who are familiar with the UNIX environment, to help them understand the nature of R commands.


RCP

Copies files between internet hosts. Issue the RCP command at the DCL prompt. You can copy files:

You can specify qualifiers in either OpenVMS-style format or UNIX-style format, but do not mix both types on the same command line.


DCL-Style Format

RCP [/[NO]LOG | /PASSWORD[=password] | /[NO]PRESERVE | /[NO]RECURSIVE | /[NO]TRUNCATE_USER_NAME[=n] | /USER_NAME=remote_user_name] source_file destination_file


UNIX-Style Format

rcp [ -p ] [ -r ] /[source_file] /[destination_file]


PARAMETERS

source_file

Required.

Source host and file specification, in the format "[username@]"host:file, where:

Table 4-2 RCP Command: Specifying the Source File
Host Possible Formats
UNIX hosts Specify the following, enclosing UNIX path names that include slashes (/) in quotation marks (" "):
  • Absolute path name, such as /etc/user/hosts, followed by the file name
  • Path name relative to your default directory, followed by the file name
OpenVMS hosts Specify the following:
  • Brackets ([ ]), which indicate your default directory, followed by the file name
  • Full file specification, such as DKA0:[WILDE.BINDS.NORTHERN]CHAPTER1.TXT

    To specify a device name, type a colon (:) and then the name. Enclose the entire parameter within quotation marks (" ").

  • A logical name, such as SYS$LOGIN:ROBIN.DAT or DIAK$9:[AMERICAN]FINDINGS.LIS

    To specify a logical name, type a colon (:) and then the name. Enclose the entire parameter within quotation marks (" ").

destination_file

Required.

Destination host and file specification information is of the same form as the source parameter, unless the file specification is completely omitted or the file name portion of the file specification is omitted. In these cases, the default file name used is the same as specified in the source parameter, the directory being the default/home directory of the user.


QUALIFIERS

/LOG

/NOLOG

Optional. Default: no logging.

Logs the files copied to or from the local system.

/PASSWORD=password

Required if /USER_NAME qualifier is used.

Password on the source or destination host system (whichever requires authentication).

/PRESERVE (OpenVMS Style)

/NOPRESERVE

-p (UNIX style, valid only on UNIX systems)

Optional.

Preserves the file protection mode and modification date during a copy.

/RECURSIVE (OpenVMS Style)

/NORECURSIVE

-r (UNIX style, valid only on UNIX systems)

Optional.

Recursively copies each subtree rooted at the directory you specify in the UNIX file specification. For OpenVMS hosts, specify [directory...] (with three trailing periods) in the file specification instead of using this qualifier.

/TRUNCATE_USER_NAME[=n]

/NOTRUNCATE_USER_NAME

Optional. Default: no truncation.

Truncates the user name to the specified number of characters. If you omit n, the default is eight characters.

/USER_NAME=remote_user_name

Optional. Default: current name on local host in lowercase.

Specify user name on the source or destination remote host. Use only if an entry allowing access to this user has not been added to the remote host's authentication files. You must also specify the /PASSWORD qualifier with the /USER_NAME qualifier. If necessary, truncate the user name to the required number of characters using the /TRUNCATE_USER_NAME qualifier. Specifying "username@" with the source or destination parameter is the equivalent UNIX-style method.


Examples

#1
$ RCP/LOG NYX:STATS.BNT [] 

Copies file stats.bnt from remote UNIX system nyx from under its home directory to a local file of the same name in the current directory. The /LOG qualifier causes information for the copy to be displayed. This command assumes the user has an entry in the authentication file on host nyx.

#2
$ RCP HIAIR1:AIRFRS.TXT [FLTAT.STATS]FARES1.TXT

Copies file AIRFRS.TXT from remote OpenVMS system HIAIR1, from under its home directory to a local file of a different name (FARES1.TXT) in the specified directory. This command assumes the user has an entry in the authentication file on host HIAIR1.

#3
$ RCP /PRESERVE HIAIR1:[FARES.SUMMER]FARES_SU.TXT ":DKA300:[]" 

Copies file FARES_SU.TXT from directory [FARES.SUMMER] on remote OpenVMS system HIAIR1 to the specified device and directory on the local system. The new file maintains the same name as the original. The copy preserves the source file's protection mode and modification date.

Use quotation marks (" ") for specifying the device and directory on the destination.

#4
$ RCP /USER=MILLER /PASS="AirOut" ":SYS$LOGIN:PILOTS.LIS" FALCON: 

Copies file PILOTS.LIS from the login directory of user MILLER on the local system to the user's login directory on a remote UNIX system. The user specifies the user name and password for access to the UNIX system (the password is specified in quotation marks to preserve the mixed uppercase letters).

Use quotation marks (" ") for specifying the SYS$LOGIN device and file name on the destination.

#5
$ RCP /RECURSIVE ":DKA300:[MILES...]" "nyx:/usr/tmp" 

Copies all files and any subdirectories under the local directory [MILES] to a remote UNIX host's destination directory. All the files in the subdirectories are copied as well, creating subdirectories on the remote host, as appropriate. The directory hierarchy is preserved on the UNIX host by default. This command assumes the user has an entry in the authentication file on host nyx.

#6
$ RCP /LOG /RECURSIVE [MILES...] BOSTON:[FRFL...] 

Copies the complete local subdirectory tree ([MILES...] and all subdirectories) to the destination directory on remote OpenVMS host BOSTON, while preserving the directory hierarchy and logging each file copy. This command assumes the user has an entry in the authentication file on host BOSTON.

#7
$ RCP /LOG /RECURSIVE [MILES...] BOSTON:[FRFL] 

Same as Example 6, except that all files in the local directory tree are copied directly to the destination directory itself. The command does not preserve the directory hierarchy of [MILES...] in [FRFL] on host BOSTON. In other words, the command does not create new subdirectories in BOSTON:[FRFL]; it copies all the files in [MILES] and all its subdirectories to directory [FRFL].

#8
$ RCP /USER=VAUGHN /PASSWORD=MYLES /TRUNCATE=4 STATS.TXT FRAM:TISTICS 

Copies the local file STATS.TXT to a remote user's login directory. Note the truncation of the remote user name. A user name and password are necessary if no entries for the user are present in the remote host's authentication files.

#9
$ RCP BOSTON:NAMES.LIS FRAM:ROSTER.LIS 

Copies file NAMES.LIS from remote host BOSTON to remote host FRAM (naming the file ROSTER.LIS). Assumes appropriate entries for the user have been made in each remote host's authentication files.

#10
$ RCP "MILLER@BOSTON:SYS$DIR:T2" "nelson@nyx:/usr/nelson" 

Copies file T2 from remote OpenVMS system BOSTON in the directory pointed to by the logical name SYS$DIR to remote UNIX system nyx in the specified directory. Different user names are used on the two remote systems. Entries in the remote host's authentication files must be set up properly because the passwords are not being passed.

#11
$ RCP /USER=ROSS /PASSWORD=LC12LC BOS:CLIENT.LIS "BEX:/USR" 

Copies file CLIENT.LIS from OpenVMS host BOS to UNIX host bex. The user has a proxy account on the UNIX host. The specified authentication information allows access to the account for ROSS on host BOS.


REXEC

Sends one command to a specified remote host for execution.

The difference between the REXEC facility and RSH is security checking:

To invoke the REXEC feature, type either of the following:

RSH /PASSWORD=password

or

RSH /PASSWORD

See the RSH command with the /PASSWORD qualifier.


RLOGIN

Initiates an interactive login session with a remote host.

DCL-Style Format

RLOGIN [/DROP_TIMEOUT=seconds | /EIGHTBIT | /ESCAPE_CHARACTER=character | /LOG_FILE=file | /[NO]LOWERCASE | /PROBE_TIMEOUT=seconds | /TERMINAL_SPEED=baud | /TERMINAL_TYPE=type | /[NO]TRUNCATE_USER_NAME | /USER_NAME=remote_user_name] host


UNIX-Style Format

rlogin host [ -8 ] [ -ec ] [ -l remote_user_name ]


PARAMETERS

host

Required.

Remote host to which you want to connect.


QUALIFIERS

/DROP_TIMEOUT=seconds

Required if you set /PROBE_TIMEOUT.

Maximum interval, in seconds, that your network link can be down before the software closes it.

/EIGHTBIT

-8 (UNIX style, valid only on UNIX systems)

Optional. Default: only 7-bit data is sent.

Accepts 8-bit data from the terminal and sends it to the remote system.

/ESCAPE_CHARACTER=character

-ec (UNIX style, valid only on UNIX systems)

Optional. Default: ~ (tilde).

New escape character if you want to close your RLOGIN session from the remote host.

To close your session from your local host, use a period ( . ) as the escape command.

/LOG_FILE=file

Optional. Default: no logging.

Logs a copy of the output to the specified file. Output continues to be directed to SYS$OUTPUT while it is being recorded in the log file.

/LOWERCASE

/NOLOWERCASE

Optional. Default: /LOWERCASE.

Sends your local user name to the remote host in lowercase.

To send your user name in uppercase, use either of the following:

To send your user name in mixed case, enclose it in quotation marks ( " " ).

/PROBE_TIMEOUT=seconds

Required if you set /DROP_TIMEOUT.

Interval, in seconds, that DIGITAL TCP/IP Services for OpenVMS checks to see if your network link and the remote host are both still up.

/TERMINAL_SPEED=baud

Optional. Default: current speed of your terminal.

Terminal speed in baud rate.

/TERMINAL_TYPE=type

Optional. Default: type of physical terminal you are using.

Terminal type. Use this qualifier if the remote host does not recognize your terminal.

/TRUNCATE_USER_NAME

/NOTRUNCATE_USER_NAME

Optional. Default: /NOTRUNCATE_USER_NAME.

Abbreviates the user name sent to the remote host to eight characters (required for older UNIX hosts, which limit user names to eight characters).

/USER_NAME=remote_user_name

-l remote_user_name (UNIX style, valid only on UNIX systems)

Optional. Default: current name on local host, but in lowercase.

Your user name on the remote host. Specify this qualifier if your user names on the remote host and local host are different.

To send your user name in uppercase, use either of the following:

To send your user name in mixed case, enclose it in quotation marks ( " " ).


Examples

#1
$ RLOGIN /USER_NAME="BlissTon" ROLLS 

An OpenVMS user logs into account BlissTon on UNIX host rolls. The mixed-case remote user name is in quotation marks so RLOGIN does not send it all lowercase, which is the default. This example assumes the user has a proxy account on the remote host.

#2
$ RLOGIN /NOLOWERCASE /USER_NAME=DAVE PLETHORA 

User DAVE starts an interactive login session with UNIX host plethora. Because this user has an uppercase user name, it is specified with the /NOLOWERCASE qualifier. This example assumes the user has a proxy account on the remote host.

#3
$ RLOGIN /ESCAPE_CHARACTER="+"  PJARO [Return] 
Password:        (not echoed)[Return]
Last login: Fri Aug 22 16:50:40 from world.wide.webber.com 
DIGITAL UNIX System - 4: Tues Aug 26 11:02:20 EST 1997 
 
You have mail. 
Tues Aug 26 11:02:20 EST 1997 
 
pjaro> WHO [Return] 
black ttyp0   Aug 27 11:02   grades.philosophy.ucd.edu. 
bristow   ttyp1   Aug 12 09:00   grades.biology.ucd.edu. 
cutler    ttyp2   Aug 26 08:55   grades.math.ucd.edu. 
 
pjaro> PWD [Return] 
/usr/users/black 
pjaro> ls [Return] 
bin                     Sem1.paper              Sem2.paper 
 
pjaro> +. (not echoed) 
%RSH-S-LCLCLOSED, Local connection closed 
$ 

OpenVMS user BLACK, with UNIX user name black, logs into UNIX host pjaro and resets the escape character to a plus sign. By default, DIGITAL TCP/IP Services for OpenVMS passes the user name and commands to the remote host in lowercase.

#4
$ RLOGIN FANTAC [Return] 
OpenVMS Version 7.1 - Unauthorized access is prohibited.
 
Username: TDERR [Return] 
Password:         (not echoed) [Return]
   .
   .
   .
$

TDERR logs into remote OpenVMS host FANTAC.

#5
$ RLOGIN QANCE /DROP_TIMEOUT=45 
%RLOGIN-E-INETERROR, Internet interface error 
-RLOGIN-I-INETCALL, setsockopt(TCP_DROP_IDLE) 
-SYSTEM-F-BADPARAM, bad parameter value 
$ 

The command fails because the /DROP_TIMEOUT and /PROBE_TIMEOUT qualifiers must both be set.


RSH

Sends a command to a remote host for execution, including a command that invokes a remote shell script or remote command procedure. Any command recognized by the remote host is valid. When using the RSH command, consider the following:

DCL-Style Format

RSH host [/EIGHTBIT | /ESCAPE_CHARACTER=character | /LOG_FILE=file | /[NO]LOWERCASE | /PASSWORD[=password] | /[NO]SYSERROR | /TERMINAL_SPEED=n | /TERMINAL_TYPE=type | /[NO]TRUNCATE_USER_NAME | /USER_NAME=remote_user_name] [ remote_command ]


UNIX-Style Format

rsh host [ -l remote_user_name ] [ remote_command ]

This format is valid only on UNIX systems.


PARAMETERS

host

Required.

Remote host at which you want the command to execute.

remote_command

Optional. Default: none.

Command you are sending to the remote host for execution.


Note

The remote_command must be the last item on the command line.


QUALIFIERS

/EIGHTBIT

Optional. Default: only 7-bit data is sent.

Accepts 8-bit data from the terminal and sends it to the remote system.

/ESCAPE_CHARACTER=character

Optional. Default: ~ (tilde).

New RLOGIN escape character. This character lets you exit the RLOGIN process without typing the remote host's typical logout sequence, for example, LOGOUT or Ctrl/D.

Typing the escape character and a period (.) breaks the connection with the remote host, for example:

remote> ~. (not echoed) 
%RSH-S-LCLCLOSED, Local connection closed 
local_vms> 

/LOG_FILE=file

Optional. Default: no logging.

Logs a copy of the output to the specified file. Output continues to be directed to SYS$OUTPUT while it is being recorded in the log file.

Not valid with /SYSERROR.

/LOWERCASE

/NOLOWERCASE

Optional. Default: /LOWERCASE.

Sends your local user name to the remote host in lowercase.

To send your user name in uppercase, use either of the following ways:

To send your user name in mixed case, enclose it in quotation marks ( " " ).

/PASSWORD[=password]

Optional.

Your password on the remote host.

Invokes the local REXEC facility that directs your RSH command to the REXEC server on the remote host. This server does authentication checking using the user name and password that you specified on the RSH command line.

/SYSERROR

/NOSYSERROR

Optional. Default: /NOSYSERROR.

Directs diagnostics to SYS$ERROR and output to SYS$OUTPUT.

When SYS$ERROR and SYS$OUTPUT both output to the same terminal, the output might be garbled.

/NOSYSERROR directs output only to SYS$OUTPUT.

/TERMINAL_SPEED=n

Optional. Default: your terminal's current speed.

Terminal speed passed to the remote host during an RLOGIN session.

/TERMINAL_TYPE=type

Optional. Default: your terminal's current type.

Terminal type passed to the remote host during an RLOGIN session.

/TRUNCATE_USER_NAME

/NOTRUNCATE_USER_NAME

Optional. Default: /NOTRUNCATE_USER_NAME.

Abbreviates the user name sent to the remote host to eight characters (required for older UNIX hosts, which limit user names to eight characters).

/USER_NAME=remote_user_name

-l remote_user_name (UNIX style, valid only on UNIX systems)

Optional. Default: same name on local host, but in lowercase.

Your user name on the remote host. Specify this qualifier if your user names on the remote host and local host are different.

To send your user name in uppercase, use either of the following ways:

To send your user name in mixed case, enclose it in quotation marks ( " " ).


Examples

#1
$ RSH HENCE MAN CP 
 cp(1) 
 
   Name 
     cp - copy file data 
 
   Syntax 
     cp [ -f ] [ -i ] [ -p ] file1 file2 
   .
   .
   .
   See Also 
     cat(1), pr(1), mv(1) 
$ 


Previous | Next | Contents