Configuring SSH for Remote Job Execution

Most applications that leverage /usr/bin/ssh on compute nodes can be configured to use /usr/bin/rsh. In the event that your application requires SSH access to compute nodes, ClusterWare provides this ability through /etc/beowulf/init.d/81sshd. To start /usr/sbin/sshd on compute nodes, enable the 81sshd script and reboot your nodes:

[root@cluster ~] # /sbin/beochkconfig 81sshd on
[root@cluster ~] # bpctl -S all -R
When each node boots, 81sshd starts sshd on the node, and the master's root user will be able to SSH to a compute node without a password, e.g.:
[root@cluster ~] # ssh n0 ls
By default, compute node sshd daemons do not allow for password-based authentication -- only key-based authentication is available -- and only the root user's SSH keys have been configured.

If a non-root user needs SSH access to compute nodes, the user's SSH keys will need to be configured. For example, create a DSA key using ssh-keygen, and hit Enter when prompted for a password if you want password-less authentication:

[user1@cluster ~] $ ssh-keygen -t dsa
Since the master's /home directory is mounted (by default) as /home on the compute nodes, just copy the public key to ~/.ssh/authorized_keys:
[user1@cluster ~] $ cp -a ~/.ssh/id_dsa.pub ~/.ssh/authorized_keys
Now the user can run commands over SSH to any node using shared key authentication:
[user1@cluster ~] $ ssh n0 date
If you wish to modify sshd's settings, you can edit /etc/beowulf/conf.d/sshd_config and then reboot the nodes. Node-specific sshd configuration settings can be saved as /etc/beowulf/conf.d/sshd_config.$NODE.

Client behavior for SSH on the nodes can be adjusted by editing the global /etc/beowulf/conf.d/ssh_config or a node-specific /etc/beowulf/conf.d/ssh_config.$NODE. This SSH client configuration will only be useful when using SSH from node to node. For example:

[user1@cluster ~] $ ssh n0 ssh n1 ls
Note that /etc/beowulf/conf.d/sshd_config and ssh_config only affect SSH behavior on compute nodes. The master's SSH configuration will not be affected.