Purpose
Provides the
server function for remote command execution.
Syntax
Note: The
rshd daemon
is usually started by the
/etc/services file.
Changes to the rshd daemon can be made
using the System Management Interface Tool (SMIT) or System Resource
Controller (SRC), by editing the kill -1 InetdPID command
to inform the inetd daemon of the changes to its configuration
file.
Service Request Protocol
When the rshd daemon receives a service
request, it initiates the following protocol:
- The rshd daemon
checks the source port number for the request. If the port number
is not in the range 512 through 1023, the rshd daemon terminates
the connection.
- The rshd daemon
reads characters from the socket up to a null byte. The string read
is interpreted as an ASCII number (base 10). If this number is nonzero,
the rshd daemon interprets it as the port number of a secondary
stream to be used as standard error. A second connection is created
to the specified port on the client host. The source port on the local
host is also in the range 512 through 1023.
- The rshd daemon
uses the source address of the initial connection request to determine
the name of the client host. If the name cannot be determined, the rshd daemon
uses the dotted decimal representation of the client host's address.
- The rshd daemon
retrieves the following information from the initial socket:
- A null-terminated string
of at most 16 bytes interpreted as the user name of the user on the
client host.
- A null-terminated string
of at most 16 bytes interpreted as the user name to be used on the
local server host.
- Another null-terminated
string interpreted as a command line to be passed to a shell on the
local server host.
- The rshd daemon
attempts to validate the user using the following steps:
- The rshd daemon
looks up the local user name in the chdir subroutine).
If either the lookup or the directory change fails, the rshd daemon
terminates the connection.
- If the local user ID
is a nonzero value, the rshd daemon searches the html