SSH key pair
SSH key pairs offer enhanced security and convenience and are supported on the ACCRE cluster. The following instructions should help you set this up.
NOTE: ACCRE policy requires that you always secure your private key with a password to keep it safe in case someone else accesses your workstation.
For Linux and OS X
Open a shell and create a key pair using ssh-keygen. The options listed below are acceptable;
$ssh-keygen -t rsa -b 4096 -C "<your email address>"
or
$ssh-keygen -t ed25519 -C "<your email address>"
You will be prompted for a file to save as
Enter file in which to save the key (/home/<username>/.ssh/id_rsa):
If this is your only key feel free to save as the default. While it will allow you to create a key with no password we encourage you to enter a strong password you will not forget. Not having a password on this key is a violation of compliance and offers no protection should someone access your computer or private key.
Enter passphrase (empty for no passphrase):
After entering and confirming the password you will see the key be generated with text similar to the following;
Your public key has been saved in <the filename you chose above>.pub The key fingerprint is: SHA256:bDiemenwdiolsIO$)@(*@_)#($KSjed <your email address> The key's randomart image is: +---[ ]----+ | ..nnx.111 | | . =... . | | o +o+ .. o..| | . Bo*xx.n ..o.| | . ..@.SSE+.yl. | | . .o* x-$. . | | . Xo +.. . | | .x 0 + | | ..+. . | 1+----[SHA256]-----+
You then copy the key to accre;
$ssh-copy-id <vunetid>@login.accre.vu
This will prompt you for your ACCRE password, then will copy the public key to your .ssh/authorized_keys file on the cluster. Alternatively you can copy the contents of the .pub file that was created and paste those into your .ssh/authorized_keys file on ACCRE however to do this you may need to mkdir .ssh and then create the authorized_keys file on the cluster, where the ssh-copy-id command does this for you. Now you should be able to add the key
$ssh-add
Enter your passphrase you created for the key, then log into ACCRE with the key.
$ssh <vunetid>@login.accre.vu
This does assume you have a key agent installed and running. In some cases you you may run ssh-add and get the following;
$ssh-add Could not open a connection to your authentication agent.
In that case you will need to load a key agent to use key pairs. Typically this can be accomplished with the following;
eval `ssh-agent` && ssh-add
or
eval $(ssh-agent) && ssh-add
either of these commands will load an authentication agent and prompt for the credentials for your key. From here you should be able to log into the cluster without having to type a password each time (
$ssh <vunetid>@login.accre.vu