z/OS Communications Server: IP User's Guide and Commands
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


The z/OS UNIX orsh/rsh Command—Execute a Command on the remote host

z/OS Communications Server: IP User's Guide and Commands
SC27-3662-00

Purpose

Use the z/OS UNIX orsh/rsh command to execute a command on the remote host and receive the results on the local host.

Notes:
  1. The rsh command is a synonym for the orsh command in the z/OS UNIX shell. The rsh command syntax is the same as the orsh command syntax.
  2. If the -s parameter is not used to specify the port, the port to be used by the client must be defined in the /etc/services file as a shell entry defined to TCP. For information about /etc/services, Protocol Number, and Port Assignments, see the z/OS Communications Server: IP Configuration Reference.

Format

Read syntax diagramSkip visual syntax diagram
>>-orsh--+-----+--+-----+--+----------------------+------------->
         '- -?-'  '- -d-'  '- -l user_id/password-'   

   .- -s port-.                          
>--+----------+--foreign_host--command-------------------------><
   '- -s port-'                          

Note: Enter the orsh parameters -d, -l, and -s in lowercase letters because they are case sensitive. The user_id/password parameter can be case sensitive, depending on the operating system of the remote host.

Parameters

-?
Displays the help message.
-d
Activates debug tracing.
-l user_id/password
Specifies the user ID and password. You must enter the slash (/) between the user ID and password if the target system is MVS™. The character you must use can vary, depending on the target host. For VM hosts, you should use an @ character.
-s port
Specifies the TCP port number of the rsh server on the foreign host. The default is the port number defined in /etc/services.
foreign_host
Specifies the name or IP address of the foreign host to which you are sending the orsh command. Specify the foreign host by its host name or IP address. When using IPv6 link-local addresses, scope information can be provided along with the name or IP address, as described in the support for scope information in the z/OS Communications Server: IPv6 Network and Application Design Guide.
command
Specifies the command that is sent to the foreign host. The command is composed of one or more words. Coding is assigned after checking the prefixed parameters (-l or -s) and assigning the remaining string as the command. The command you specify must not require a response from you to complete. The orsh commnd cannot interact with you after you enter data in the command format.

Examples

Use the orsh command to execute a command on a remote host:
 orsh -l user28/password -s 512 mvs1 lista
 
 SYS1.HELP
 GIM.SGIMCLS0
 DSN230.DSNCLIST
 USER.CLIST
 BUILD.CLIST
 SYS1.HRFCLST
 USER28.ORSHD5.JOB00160.D0000103.?
.

Usage

Enter the required parameters on the command line. The orsh command does not prompt you for missing parameters.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2013
This information center is Built on Eclipse™ ( www.eclipse.org ).