Subject: rexec 2 of 4 (rexec.hlp)

1 REXEC
Execute Commands on a Remote Machine

Rexec is an experimental utility that opens a TCP connection to a
remote execution server (rexecd).  Typically rexecd runs on a remote
UNIX(tm) machine.  Rexec allows one command to be sent to another system
and executed there with input and output appearing back on the local
system.

DCL command format is:

$ rexec [/username = {current-username} ] host-name remote-command
        [/password= ]
        [/input = {NL:} ]
        [/output = {SYS$OUTPUT} ]
        [/error = {SYS$ERROR} ]
        [/service_port = {512} ]

2 /USERNAME
The /USERNAME parameter is optional and names a user account on the
remote machine. The parameter should normally be quoted, especially
if the username contains mixed cases.

If the username is not given REXEC will default to your VMS username
converted to lowercase and truncated to 8 characters (as per Unix
conventions).

2 host-name
The "host-name" parameter is required and names a known host which, it
is assumed, will have the required server (typically rexecd) in place.

2 remote-command
The "remote-command" string is required and is the command you wish to
have executed on the remote machine. Normally the command string should
be quoted, especially if it contains mixed cases.

2 /PASSWORD
The /PASSWORD parameter is required for login on the remote machine.
If this switch is ommitted REXEC will prompt you for the password
(with echo off).  Passwords given in the command line will usually
have to be quoted if the password contains lower case characters.
Case is preserved if the password is entered at the prompt.

2 /SERVICE_PORT
Normally the /SERVICE_PORT parameter is not supplied and REXEC connects
to the right socket address. One might connect to a service at some other
port but this is not recommended or encouraged.

2 /INPUT
The /INPUT parameter is optional defaulting to "NL:" (the null device).
You may redirect a local file as input into the execution of the remote
command.

2 /OUTPUT
The /OUTPUT parameter is optional defaulting to "SYS$OUTPUT". You may
redirect to a local file the output of the execution of the remote command.

2 /ERROR
The /ERROR paramter is optional defaulting to "SYS$ERROR". You may redirect
the error output of the execution of the remote command to a local file.

2 Warnings
Note that this version rexec is experimental.  If you give it bad
input it can fail ungracefully.  If you try to do fancy things with
the /INPUT parameter it may not work as expected.  This is a "use at
your own risk" program.

2 Examples

     $ rexec/username="jginty" julian "lpq"

This checks the line printer queue on the machine JULIAN and returns a
listing of the jobs currently in the queue.  The command will prompt
for a password before sending the command off.  Note the use of
quotes.  VMS DCL turns all parameters into UPPER CASE unless they are
quoted.  Most UNIX machines are case sensitive so you will usually
have to quote both your user name and the actual command to execute.
Machine names are case insensitive.

     $ rexec/username="jginty"/output=laser.tmp julian "lpq"

This command is similar to the previous command execpt that instead of
the queue listing appearing on your screen, it is placed into the file
LASER.TMP on the VMS machine.  This can be useful if you intend to do
some further processing on the output.

     $ rexec/user="guest"/pass="free" myst.uwo.ca "rn -c"

This sends the command "rn -c" to the machine named MYST@UWO.CA.  The
command is performed under the guest account on that machine.  The
output of the command would be displayed on your terminal.

2 Author
Rexec was written and submitted into the public domain by Kevin
Carosso, kvc@ymir.bitnet, Innosoft International Inc.
