Remote Programs
The implementation of the qrsh feature in Gridengine makes use of operating system facilities like rsh and rlogin.

Unfortunately these programs usually lack some features:

- rsh / rlogin connect to a rshd / rlogind on a fixed port number but Gridengine has to start (multiple) rshd / rlogind on variable port numbers
- rshd / rlogind do not pass correctly accounting information to their parent process - they do not call wait to collect usage information
- most rshd's fail, if the user root cannot chdir to the target users (nfs mounted) home directory

Therefore part of a Gridengine distribution are the following programs:

- rsh
- rlogin
- rshd

A special rlogin program is not yet part of Gridengine - the rlogin process is much more complicated than rsh - we would probably not only have to provide a special rlogind, but also the login program.

# 1 Rsh

The Gridengine extended version of rsh is based on NetBSD-release, rsh.c, CVS Revision 1.12,
`ftp://sunsite.cnlab-switch.ch/mirror/NetBSD/NetBSD-release/src/usr.bin/rsh`

It has been extended by a commandline option `-p <port>` to specify the tcp port rsh tries to access to build a connection to the corresponding rshd and some porting had to be done to support all current Gridengine platforms.

# 2 Rshd

The Gridengine extended version of rshd is based on NetBSD-release, rshd.c, Revision 1.16,
`ftp://sunsite.cnlab-switch.ch/mirror/NetBSD/NetBSD-release/src/libexec/rshd`

The following changes have been applied:

- Port to all Gridengine platforms
- Set osjobid / additional group id to allow process control by Gridengine
- Cleaned up wait for child process to obtain usage information
- chdir to users homedir is done only after setuid to user to allow rsh access even if homedir of user (nfs-mounted) is not readable by root (requires additionally rshd option -l)

# 3 rlogin

The Gridengine extended version of rlogin is based on NetBSD-release, rlogin.c, CVS Revision 1.23,
`ftp://sunsite.cnlab-switch.ch/mirror/NetBSD/NetBSD-release/src/usr.bin/rlogin`

It has been extended by a commandline option `-p <port>` to specify the tcp port rlogin tries to access to build a connection to the corresponding rlogind and some porting had to be done to support all current Gridengine platforms.

Copyright 2001 Sun Microsystems, Inc. All rights reserved.