rexec executes the specified command on a remote host. The remote host must be running a rexecd service (or daemon) for rexec to connect to.
If a remote user name is not specified with either the
Non-quoted shell metacharacters on the command line are interpreted on the local machine, while quoted metacharacters are interpreted on the remote machine. For example, the command
rexec otherhost cat remotefile >> localfile
appends the remote file remotefile to the local file localfile, while
rexec otherhost cat remotefile \>\> other_remotefile
appends remotefile to other_remotefile.
rexec copies its standard input to the remote command,
the standard output of the remote command to its standard output, and
the standard error of the remote command to its standard error (unless you
rexec normally terminates when the remote command does.
If rexec fails with a TIMEOUT error on Windows 7/2008R2/8/2012/10/2016 when it should have succeeded, the user can tell rexec to retry with:
A TIMEOUT error is indicated by the following error message:
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
enables socket debugging on the TCP sockets used for communication with the remote host. This option also the displays the user name sent to the rexecd service (or daemon).
specifies the remote user name to be used when executing the command. This can also be specified by including username@hostname on the command line.
does not generate a separate standard error stream. All output is sent to standard output. This is useful when you are running an interactive command. For example,
rexec -N localhost cmd rexec -N localhost sh -i
redirects input from the special device /dev/nul.
specifies the password of the specified user on the remote host.
If no password is specified, the ~/.netrc file is checked for "machine hostname login username password string" combination. If a password is not found, the user is prompted to enter a password.
If you are having trouble connecting to rexecd on a remote host, here are some possible solutions to your problems.
If you are receiving connection to server failed error, it usually implies that either there is no rexecd service (or daemon) running on the remote host or that there were more concurrent rexec requests than the remote host could handle.
Most versions of rexecd have a limit to the length of user name they can handle. On some UNIX systems, this limit is as low as 14 characters. As a result, you may receive an error message stating that the user name is too long. If you receive this message, make sure that the user name specified is valid on the remote host.
An operation was attempted on something that is not a socket
When this environment variable is set and rexec fails with a "login incorrect" message from rexecd, rexec will make one additional attempt to connect.
when set, rexec retries to establish a connection when it fails with a TIMEOUT error on Windows 7/2008R2/8/2012/10/2016.
Possible exit status values are:
This product includes software developed by the University of California, Berkeley and its contributors.
All UNIX systems. Windows 7. Windows Server 2008 R2. Windows 8. Windows Server 2012. Windows 10. Windows Server 2016.
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
- File Formats:
MKS Toolkit Connectivity Solutions Guide
PTC MKS Toolkit 10.1 patch 1 Documentation Build 2.