Topics Map > •Research Computing
CRC Setting Up Passwordless SSH (SSH Keys) on the Clusters
Background
Passwordless SSH is required on the Shared Computing Resources if you need to run MPI jobs using srun, or need to use other specialized software which uses SSH for communication between nodes. The srun command spawns copies of your executable on all of the nodes allocated to you by SLURM. It will communicate with these nodes via SSH so it is necessary that SSH is configured with SSH host keys (passwordless SSH) for your account. This document describes how to enable passwordless SSH on these systems.
Create Host Key
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.
Add Host Key to authorized_keys File
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.
Your secret key (id_rsa) is all that is needed to log into your account now. Ensure that nobody else may read it or copy it from your account
Create authorized_keys file
You should create your authorized_keys file if it does not exist.
Disable SSH Host Key Checking
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.
This will also suppress creation of entries in ~/.ssh/known_hosts and reduce log messages.