Using ssh with qrsh and qlogin
Using ssh with qrsh and qlogin
By default, the Grid Engine commands qrsh will use standard remote mechanisms (rsh/rlogin) and qlogin will use the telnet mechanism to establish interactive sessions.
qrsh by itself will use rlogin
qrsh with a command will establish a rsh connection.
qlogin does not use commands and will do a telnet
To enable the rsh/rlogin mechanism, special rsh and rlogin binaries are provided with Grid Engine (found in $SGE_ROOT/utilbin/$ARCH). In addition, to have full accounting and process control for interactive jobs, an extended rshd comes with Grid Engine.
As an alternative, Grid Engine can be configured to use ssh instead to start interactive jobs.
Advantages of using ssh:
secure connection
no need to have suid root programs installed (rsh and rlogin have to be suid root)
much larger number of running sessions per host (not limited by port number < 1024)
compression (if lots of data pushed through STDIN/STDOUT)
X-forwarding
possibility to attach a tty to remotely executed commands (ssh option -t)
Disadvantages:
Note: The following limitations only apply to versions with no Grid Engine cgroups Integration (execution side on Linux) – ie. Grid Engine 2011.11, Sun Grid Engine 6.2u5 or older with no tight SSH daemon
lack of complete accounting: the online usage of the jobs is not collected, only the wallclock time.
lack of dynamic reprioritization: the feature of adjusting the job’s priority according to the Ticket policies is not available (see reprioritize parameter in man sge_conf(5)).
potential loss of control: in some unusual cases, killing the job might leave behind idle or busy processes, even if the job is seen as finished by Grid Engine.
How to setup ssh for qrsh:
Have ssh working, all keys created …
Set the parameters rsh_daemon and rlogin_daemon in your cluster configuration to ssh:
rsh_daemon: /usr/sbin/sshd -i
rlogin_daemon: /usr/sbin/sshd -i
If you have execution hosts with different architectures that have different paths to ssh, you will have to make these settings for each execution host individually (qconf -mconf hostname), else you can change the global cluster configuration (qconf -mconf).
Set the parameters rsh_command and rlogin_command in your cluster configuration to ssh:
rsh_command /usr/bin/ssh
rlogin_command /usr/bin/ssh
If you have submit hosts with different architectures that have different paths to ssh, you will have to make these settings for each submit host individually (qconf -mconf hostname), else you can change the global cluster configuration (qconf -mconf).
How to setup ssh for qlogin:
Have ssh working, all keys created …
Set the parameter qlogin_daemon in your cluster configuration to support ssh:
qlogin_daemon: /usr/sbin/sshd -i
If you have execution hosts with different architectures that have different paths to ssh, you will have to make these settings for each execution host individually (qconf -mconf hostname), else you can change the global cluster configuration (qconf -mconf).
Set the parameter qlogin_command in your cluster configuration to support ssh:
qlogin_command path_to_qlogin_wrapper
The qlogin_wrapper script should be as follows:
#!/bin/sh
HOST=$1
PORT=$2
/usr/bin/ssh -X -p $PORT $HOST
If you have submit hosts with different architectures that have different paths to ssh, you will have to make sure that the qlogin_wrapper script is set for each submit host individualy (qconf -mconf hostname), else you can change the global cluster configuration (qconf -mconf).