Passwordless access using SSH keys
SSH keys provide a convenient way to connecting to the cluster without typing the password each time.
Linux / MacOS / Windows
Open a command prompt and generate the SSH keys running the following command. Use the default settings to generate the keys.
ssh-keygen -t rsaThis generates two keys that will be stored in your ~/.ssh directory, id_rsa (private key) and id_rsa.pub (public key). Never share your private key with anyone.
Show and copy the contents of the id_rsa.pub file. The file should contain one long line beginning with ssh-rsa:
cat ~/.ssh/id_rsa.pub
ssh-rsa AAAABCDEF...ABCDEF= youruser@yourcomputerOpen a connection to the cluster (athena or apollo):
ssh yourvcueid@athena.hprc.vcu.edu
or
ssh yourvcueid@apollo.hprc.vcu.eduCreate the .ssh directory:
[user@cluster ~]$ mkdir -p .sshCopy the contents of your id_rsa.pub file into the ~/.ssh/authorized_keys file (keep the double quotation marks at the beginning and end of the ssh-rsa line).
[user@cluster ~]$ echo "ssh-rsa AAAABCDEF...ABCDEF= youruser@yourcomputer" >> ~/.ssh/authorized_keysEnsure that the folder and file permissions are correct:
[user@cluster ~]$ chmod 700 ~/.ssh
[user@cluster ~]$ chmod 644 ~/.ssh/authorized_keysNext time you ssh into the cluster you shouldn't need to provide a password.