Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ remshd(1M) — HP-UX 5.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

remsh(1)

inetd(1M)

rcmd(3X)

hosts.equiv(5)

inetd.conf(5)

inetd.sec(5)

services(5)

     REMSHD(1M)               Series 300 Only               REMSHD(1M)

     NAME
          remshd - remote shell server

     SYNOPSIS
          /etc/remshd

     HP-UX COMPATIBILITY
          Level:    HP-UX/NON-STANDARD

          Origin:   UCB

          Remarks:  Implemented on the Series 300 only.

     DESCRIPTION
          Remshd is the server for remsh(1) and  rcp(1).   The  server
          provides  remote  execution  facilities  with authentication
          based on privileged port numbers.

          Inetd(1M) calls remshd when a service request is received at
          the  port  indicated  for the ``shell'' (or ``cmd'') service
          specification  in  /etc/services  (see  services(5)).    The
          internet  daemon  creates a connection to the service on the
          client's  host.   Remshd  uses  the  following   path   when
          executing the specified command:

               /bin:/usr/bin:/usr/contrib/bin:/usr/local/bin

          When remshd receives a service request, it responds with the
          following protocol:

          1) The server checks the client's source port.  If the  port
             is  not  in  the  range  0-1023,  the  server  aborts the
             connection.

          2) The server reads characters from the connection up  to  a
             null  (`\0') byte.  It interprets the resultant string an
             ASCII number, base 10.

          3) If the number is non-zero, it is interpreted as the  port
             number  of  a secondary stream to be used for the stderr.
             A second connection is then created to the specified port
             on  the  client's  host.   The source port of this second
             connection is also in the range 0-1023.

          4) The server checks the client's source  address.   If  the
             address   is   associated   with  a  host  for  which  no
             corresponding entry exists in the  host  name  data  base
             (see hosts(5)), the server aborts the connection.

          5) The server reads the client's host account name from  the
             first  connection.  This is a null-terminated sequence of
             at most 16 characters.

     Hewlett-Packard               - 1 -             (printed 7/16/86)

     REMSHD(1M)               Series 300 Only               REMSHD(1M)

          6) The server reads the server's host account name from  the
             first  connection.  This is a null-terminated sequence of
             at most 16 characters.

          7) The server reads a command to be passed to the shell from
             the  first  connection.  The command length is limited by
             the maximum size of the system's argument list.

          8) Remshd then validates the user as follows:

             The user account name for the server's host (step  6)  is
             looked  up  in the password file and a chdir is performed
             to the user's home directory in the  server's  host.   If
             either  the  lookup  or  chdir  fail,  the  connection is
             terminated.  If the client account is not  equivalent  to
             the  server's host account, the connection is terminated.
             For  more  information   on   equivalent   accounts   see
             hosts.equiv(5).

          9) A null byte is returned on the connection associated with
             stderr and the command line is passed to the normal login
             shell of  the  user.   The  shell  inherits  the  network
             connections established by remshd.

             In order to run remshd,  the  following  line  should  be
             present in /etc/inetd.conf:

                  shell  stream  tcp  nowait  root /etc/remshd  remshd

     DIAGNOSTICS
          All diagnostic  messages  are  returned  on  the  connection
          associated  with stderr, after which any network connections
          are closed.  An error is indicated by a leading byte with  a
          value  of  1  (0 is returned in step 9 above upon successful
          completion of all the steps prior to the command execution).

          Malformed from address
               The first socket connection does  not  use  a  reserved
               port  or  the  client's  host  address  is  not an ARPA
               internet address.

          Can't get stderr port
               Unable to complete  the  connection  of  the  secondary
               socket used for error communication.

          Second port not reserved
               The secondary socket connection does not use a reserved
               port.

          Locuser too long
               The name of the user account on the  client's  host  is
               longer than 16 characters.

     Hewlett-Packard               - 2 -             (printed 7/16/86)

     REMSHD(1M)               Series 300 Only               REMSHD(1M)

          Remuser too long
               The name of the user on the  server's  host  is  longer
               than 16 characters.

          Command too long
               The  command  line  passed  exceeds  the  size  of  the
               argument list (as configured into the system).

          Login incorrect
               No password file entry existed for the user name on the
               server's host.

          No remote directory
               The chdir command to the home directory in the server's
               host failed.
          Permission denied
               The authentication procedure described above in step  8
               failed.

          Can't make pipe
               The pipe needed for the stderr wasn't created.

          No more processes
               The server was unable to fork a process to  handle  the
               incoming connection.

               Next step: Wait a period of time  and  try  again.   If
               this  message persists, then the server's host may have
               a runaway process that is using all the entries in  the
               process table.

          <system call>: ...
               Error in executing system call.  Appended to this error
               is a message specifying the cause of the failure.

          <shellname>: ...
               The user's login shell  could  not  be  started.   This
               message  is  returned on the connection associated with
               the stderr, and is not preceded by a leading byte  with
               a  value  of  1.  Other messages can be returned by the
               remote command when it executes.

     FILES
          /etc/hosts.equiv         list of equivalent hosts
          $HOME/.rhosts            user's private equivalence list

     SEE ALSO
          remsh(1),     inetd(1M),      rcmd(3X),      hosts.equiv(5),
          inetd.conf(5), inetd.sec(5), services(5).

     WARNINGS

     Hewlett-Packard               - 3 -             (printed 7/16/86)

     REMSHD(1M)               Series 300 Only               REMSHD(1M)

          The authentication procedure used here assumes the integrity
          of  each  host and the connecting medium.  This is insecure,
          but is useful in an ``open'' environment.

     Hewlett-Packard               - 4 -             (printed 7/16/86)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026