Table of Contents IBM WorkGroup
TCP/IP Tutorial and Technical Overview

4.8 Remote Execution Command Protocol (REXEC)

Figure: Remote Execution Command Protocol (REXEC)

REXECD (Remote EXEcution Command Daemon) is a server that allows execution of the REXEC or RSH (Remote Shell Protocol) command from a remote host over the TCP/IP network. The client function is performed by the REXEC process.

4.8.1 Principle of Operation

REXECD is a server (or daemon). It handles commands issued by foreign hosts, and transfers orders to slave virtual machines for job execution. The daemon performs automatic login, and user authentication when user ID and password are entered.

REXEC command is used to define user ID, password, host address, and the process to be started on the remote host. Both server and client are linked over the TCP/IP network.

Figure: REXECD Principle

4.8.2 Implementations VM

The REXECD service machine supports both the remote execution protocol (REXEC) on port 512, and the remote shell protocol (RSH) on port 514.

Both client and server functions are implemented under VM.

The REXECD machine can transfer commands to a user machine, or slave machine. A slave machine is useful for the user who does not have his own virtual machine defined in the VM system where he wants to execute some process.

Slave machines are autologged when REXECD executes its PROFILE EXEC. The following is an example of the REXECD parameters. This is part of the PROFILE EXEC. This file can be shared between the REXECD virtual machine and the slave machine(s).



When using the REXECD VM server from another host, you are prompted for a user ID and a password. You can either enter a valid user ID and its RACF password (if the RACF option is enabled) or the keyword guest and a null password to use one of the slave machines. To enable the RACF option (that is to use the RACF password to autolog a user ID) the following steps must be performed:

  1. Start REXECD with the -r option
  2. Copy the VALIDATE EXEC (from FTPSERVE.191) on REXECD.191

Figure: REXECD Scheme under VM

When using the client function from VM (REXEC command) the NETRC DATA file may provide you with an alternative to specifying the user ID and password as REXEC parameters. This file should be stored using the A0 filemode.

Example of NETRC DATA A0 file:

machine fsc5 login guest password xxx
machine psfred login FRED password pass

The first entry identifies a slave machine (the password does not matter).

The following is a sample response that is displayed as a result of using the REXEC command and the NETRC DATA file:

rexec fsc5 q t
TIME IS 05:43:10 EUR FRIDAY 02/10/95
CONNECT= 00:01:58 VIRTCPU= 000:02.41 TOTCPU= 000:04.59
Ready; T=0.39/0.71 05:43:14 MVS

TCP/IP for MVS includes both server and client remote execution functions (REXEC). The implementation is as follows:

Another possibility to submit jobs to an MVS/JES subsystem is the job submission facility from an MVS FTP server (see MVS for more information). AIX

All AIX systems are implemented with both REXEC client and server. AIX/6000

The rexecd daemon is a subserver controlled by the inetd subsystem (also known as the super daemon).

The $HOME/.netrc file can be used to specify automatic login information for the user ID and password to use at the foreign host. Since this file is not encrypted, the automatic login feature is not available when your AIX system has been configured with the securetcpip command.

The rsh command and the rshd server (daemon) can be used. Since rsh and rshd do not provide a secure environment for transferring files, they are disabled by running the securetcpip command.

The securetcpip command is used to enable additional TCP/IP security environment by disabling commands that are not trusted. For more information about the securetcpip command, please refer to AIX Version 3.2 for RISC System/6000 Communication Concepts and Procedures. OS/2

TCP/IP for OS/2 provides client and server functions of REXEC. Before activating the REXEC server, the variables USERID and PASSWORD have to be defined. They are used to define which remote users can access your system. REXECD and REXEC are the commands used for server and client respectively. The REXEC command uses the /ETC/NETRC file to automate the login process.

OS/2 provides client and server (RSHD) functions of RSH. Before activating the RSH server, the RHOSTS file in the ETC directory must be created. It is used by the RSH server to verify the authorization of remote hosts. You must specify the full domain name (for example, of the remote hosts.

The following is an example REXEC session from OS/2 to AIX V3.

[C:\]rexec rs60002 -l paul -p mypasswd ls -ls
total 368
   4 drwxr-xr-x   2 li       staff        512 Sep 09 18:49 hippi
   4 drwxr-xr-x   3 li       staff        512 Sep 09 11:07 info
  84 -rw-r--r--   1 li       staff      83913 Sep 18 11:51
   4 drwxr-xr-x   4 li       staff        512 Sep 17 11:10 mit
   4 -rw-r--r--   1 li       staff       1818 Sep 17 11:14 x11r5doc.du DOS

TCP/IP for DOS is implemented with the client REXEC and the RSH commands. REXEC requires an REXEC Daemon to be running on the foreign host. This REXEC command is used to provide the necessary parameters, user name, password, internet address, and command to be executed on the foreign host. RSH requires a RSH server to be running on the foreign host. Like REXEC, the RSH command executes a command on the remote host. However, RSH neither requires nor allows you to supply a password.

Table of Contents X Window System