[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    REXEC(1) manual page Table of Contents

Name

rexec -- remote execution client for an exec server

Synopsis

rexec [ -a -c -d -h -n -s ] [--] host command

Description

Rexec calls the rexec(3) routine to act as a client for the remote host’s rexecd(8) server.

It asks that ‘‘command’’ be run on the host computer, using username/password authentication. See rexec(3) and rexecd(8) for details of the protocol.

Options

Rexec accepts the following options:

-a

Do not set up an auxiliary channel for standard error from command;
the remote standard error and output are then both returned on the local standard output. By default, rexec asks that a separate channel be set up for diagnostic output from the remote command.

-c

Do not close remote standard input when local standard input closes.
Normally the standard input to the remote command is closed when the local standard input is closed.

-d

Turn on debugging information. In particular the command sent to the
remote host will be echoed.

-h

Print a usage message.

-n

Explicitly prompt for name and password. Otherwise,
$HOME/.netrc will be scanned for login information.

-s

Do not echo signals received by the rexec onto the remote
process. Normally, signals which can be trapped are passed on to the remote process; then, when you type CNTRL-C, the remote process terminates as well.

--

Signals end of options to
rexec to allow option switches in ‘‘command.’’

The only option that is very useful is -n; even then, if you have not set up a password in $HOME/.netrc, you should still be prompted.

Example

rexec othermachine -- cat ">remote_file; date" <local_file

will send local_file to the othermachine as remote_file.

Bugs

When a signal is received locally, the signal is passed to the remote command using blocking i/o. Even though it is only one byte, this may result in delay in teminating the local command if communications are slow. Also, the signal remains raised in the local rexec procedure, so typically the remote command cannot ask for further user input after the signal is sent.

It is annoying to have to use the ‘‘--’’ flag to include options in the remote command without quoting them. This is because the GNU getopt(3) routine is being called. This behavior may be corrected by setting the POSIXLY_CORRECT environtmental variable.

Please send bug reports or system incompatibilities to the author.

See Also

rexec(3) , rexecd(8)

Author

Michael Sadd
sadd@msc.cornell.edu
http://www.msc.cornell.edu/~sadd/


Table of Contents