Setting up password-less ssh

  • NOTE: All sbgrid bound Servers and Workstations require 'pub' key to be uploaded: See Below

    1. Generate ssh key-pair for local workstation: ssh-keygen -t rsa ; accept default options and hit return when prompted for passphrase.
    2. Copy public key (~/.ssh/ to remote system: scp ~/.ssh/ remotesys:~/ If this is the first connection to the remote system, type yes to accept the remote system key.
    3. Login to remote system, configure remote system to trust public key:

    • ssh remotesys
    • create ~/.ssh if it doesn't exist: mkdir ~/.ssh
    • cat ~/ >> ~/.ssh/authorized_keys
    • chmod 700 ~/.ssh
    • chmod 640 ~/.ssh/authorized_keys
    • Logout of remote system, and repeat login to check that everything works correctly. If so, ~/ can be removed from the remote system.

For SBGrid Systems

There is no need for ~/.ssh/authorized_keys, the file is ignored on all our linux systems. The 'pub' key must be uploaded to our authentication servers. These examples assume you copied the pub key over, you can also copy and paste the entire contents of the .pub file between systems.

You will need to run these commands on If you are a Consortium member use

ipa user-mod $USER --sshpubkey="$(cat ~/.ssh/"

Or for multiple keys

ipa user-mod $USER --sshpubkey="$(cat ~/.ssh/" --sshpubkey="$(cat ~/.ssh/"\
 --sshpubkey="$(cat ~/.ssh/"

If you are using csh/tcsh shell

ipa user-mod $USER --sshpubkey="`cat ~/.ssh/`"

If you get a 'Kerberos Credential' error you will need to enter the following command, type your password and try again.

kinit $USER

Note: The 'ipa' command is not available on most workstations, connect to and perform the commands there.