Export (0) Print
Expand All

Rexec

Updated: January 21, 2005

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Rexec

In order to run commands on a remote, non-Windows computer, computers running the Windows Server 2003 family, Windows XP, and Windows 2000 operating systems can use the Rexec tool to connect to non-Windows computers that provide the Rexec service (daemon) and that have the service running. The rexec command authenticates the user name on the remote computer before executing the specified command. Used without parameters, rexec displays help.

Note

  • You cannot connect to computers running the Windows Server 2003 family, Windows XP and Windows 2000 operating systems by using the rexec command because Windows operating systems do not provide the Rexec service.

Syntax

rexec [Host] [-lUserName] [-n] [Command]

Parameters
Host
Specifies the remote host (computer) on which to run Command by IP address or name.

-l UserName
Specifies the user name on the remote computer. If omitted, the user name of the user who is currently logged on is used.

-n
Redirects the input of rexec to the NUL device. This prevents the display of the command results on the local computer.

Command
Specifies the command to run on the remote computer.

/?
Displays help at the command prompt.

Remarks
  • Standard operation

    The rexec command prompts the user for a password and authenticates the given password on the remote computer. If the authentication succeeds, the command is run.

    The rexec command copies standard input to the remote command, standard output of the remote Command to its standard output, and the standard error of the remote command to its standard error. The rexec normally quits when the remote command quits.

  • Using Redirection symbols

    for redirection to occur on the remote computer, enclose redirection symbols in quotation marks (for example, ">>"). If you do not use quotation marks, redirection occurs on the local computer. For example, the following command appends the remote file RemoteFile to the local file LocalFile:

    rexec othercomputer cat remotefile >> localfile

    The following command appends the remote file RemoteFile to the remote file OtherRemoteFile:

    rexec othercomputer cat remotefile ">>" otherremotefile

  • Using interactive commands

    You cannot run most interactive commands. For example, vi or emacs cannot be run by using rexec. You can, however, use telnet instead.

  • This command is available only if the Internet Protocol (TCP/IP) protocol is installed as a component in the properties of a network adapter in Network Connections.

Examples

To execute the telcon command on the remote computer vax1 using the name admin1, type:

rexec vax1 -l admin1 telcon

Formatting legend

 

Format Meaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft