in.rshd, rshd — Remote Shell Server
The in.rshd daemon is the server for the rsh(1) program. The server provides remote execution facilities with authentication based on privileged port numbers.
in.rshd is invoked by inetd(1M) each time a shell service is requested and executes the following protocol.
The server checks the client's source port. If the port is not in the range 0-1023, the server aborts the connection. The client's host address (in hexadecimal) and port number (in decimal) are the arguments passed to in.rshd.
The server reads characters from the socket up to a null (\0) byte. The resultant string is interpreted as an ASCII number, base 10.
If the number received in step 1 is non-zero, ...