Name

rexec

Synopsis

Stands for remote execute command, which runs commands on remote machines running the rexec service.

Syntax

rexec remotehost [-l username] [-n] command

Options

remotehost

The remote machine running the rexec service.

-l username

The credentials used to run the command on the remote host.

-n

Redirection of standard input of rexec to NULL. (Try using this for commands that run interactively.)

command

The command to remotely execute (enclose in quotes if there are embedded spaces).

Examples

Perform a directory listing on the Unix machine BONGO as user mitcht by remotely executing the ls command:

                     rexec bongo -l mitcht "ls ~"
Password (bongo:): ********
doc
fig
read.ps

Note that rexec prompts for a password before executing the command remotely.

Notes

  • rexec copies standard input to the remote command.

  • The rexec terminates when the remote command has been executed.

  • rexec cannot be used to run some common interactive Unix commands such as emacs (use telnet to do this instead).

See Also

rsh, telnet

Get Windows 2000 Administration in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.