Configuring and Managing MPE/iX Internet Services (August 2002)

Chapter 6
REMSH Service
Using remsh
72
UNIX Configuration
The remsh service does not prompt for user ID and passwords. That information is handled via the command
line parameters and configuration on the UNIX host. See the Using remsh section for details on how the
user id is determined and passed to the UNIX host.
Password information is bypassed by use of a .rhosts in the remote users home directory or by use of the file
/etc/hosts.equiv. See the man pages of the UNIX system for details on how to set up a /etc/hosts.equiv
file. A users .rhosts file entry will consist of the MPE/iX system name and user ID.
If you wish to access the HP-UX Host taltos as user cawti from the MPE/iX system jhereg while user
MANAGER.SYS, youll need to set up a host equivalency via the /etc/hosts.equiv file, or you will create a
.rhosts file in the home directory of user cawti on the taltos machine. The .rhosts file entry would look
like:
jhereg MANAGER.SYS
This will cause the remsh daemon on the UNIX host to allow a connection from MANAGER.SYS on jhereg to the
cawti user on the host taltos. The .rhosts file for user cawti would contain an entry for every host and
userid that you desired to access the taltos host as if they were the user cawti.
NOTE The MPE/iX equivalent of the UNIX user id is the User.Account. An artifact of the MPE/iX
implementation is that the MPE/iX information is usually reported in upper case. So be sure
your .rhosts or /etc/hosts.equiv entries use the MPE/iX user ID information in uppercase.
Using remsh
The remsh service is accessed by running the REMSH.NET.SYS program. You may do so under the MPE/iX CI
or under the POSIX shell. While the format of the commands will differ depending on how you run the
program, the parameter list remains the same.
For the purposes of explaining the parameters, look at a sample invocation from the POSIX shell. Detailed
examples of both the POSIX shell and MPE/iX invocations will follow later.
From the POSIX shell, invoke the remsh by typing:
/SYS/NET/REMSH remotehost -1 remoteuser remotecommand
In all cases you must provide a remotehost and a remotecommand. The remsh program will fail and generate
an error message otherwise. Unless the remote system has MPE/iX type userids, you will also need to provide
a -l remoteuser parameter as well. Otherwise the remote system will not allow the connection.
The name of the remote host you are attempting to connect to is remotehost. The host name can be either the
official name or an alias as understood by gethostbyname().
The userid is remoteuser on the remote system.
NOTE The traditional UNIX implementation of remsh makes the -l remoteuser parameter optional.
If you do not provide a -l remoteuser parameter, remsh takes your current userID and
assumes that you wish to connect to the same userID on the remote system. Since the MPE