Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


The first step in establishing passwordless SSH is to create your public host keys.  Login to the cluster and run the ssh-keygen command.  Accept all of the default values and do not enter a passphrase.

Code Block
[beaker@login1 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/beaker/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/beaker/.ssh/id_rsa.
Your public key has been saved in /home/beaker/.ssh/
The key fingerprint is:
The key's randomart image is:
+--[ RSA 2048]----+
|   .oo  o+ . .. E|
|   o+o.o .= .  . |
|  .oo.+ + .*     |
|   ... o o  =    |
|        S    .   |
|       .         |


After you have created your public host key above, append the contents of ~/.ssh/ to ~/.ssh/authorized_keys.  This will enable mpirun to login from one compute node to another using SSH without a password.

Code Block
[beaker@login1 ~]$ cat .ssh/ >> .ssh/authorized_keys


To avoid ssh prompts when automatically logging into compute nodes allocated by the scheduler, configure ssh to not use strict host key checking.  Create the file ~/.ssh/config as shown below.

Code Block
Host *
   StrictHostKeyChecking no
   UserKnownHostsFile /dev/null
   LogLevel QUIET

This will also suppress creation of entries in ~/.ssh/known_hosts and reduce log messages.