Versions Compared

Key

  • 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
languagetext
[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/id_rsa.pub.
The key fingerprint is:
06:2c:2c:c5:e9:74:f0:ed:25:59:d1:fc:c3:90:4f:75 beaker@login1.nots.rice.edu
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/id_rsa.pub to ~/.ssh/authorized_keys.  This will enable mpirun to login from one compute node to another using SSH without a password.

Code Block
languagetext
[beaker@login1 ~]$ cat .ssh/id_rsa.pub >> .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
languagetext
Host *
   StrictHostKeyChecking no
   UserKnownHostsFile /dev/null
   LogLevel QUIET

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