Generate a Key Pair (MacOS, Linux or Windows Subsystem Linux):
1. On your local machine, open a Terminal or Command Prompt window.
2. Type the following command:
ssh-keygen -t rsa -b 4096
3. You will be asked to name the file to save the key in. If this is your primary key, or only key, you can use the default name and press “Enter”, otherwise give it a unique name.
Generating public/private rsa key pair.
Enter file in which to save the key (/home/mobaxterm/.ssh/id_rsa):
Created directory '/home/mobaxterm/.ssh'.
Enter passphrase (empty for no passphrase):
4. You will be prompted to enter a passphrase for the key itself. Enter a passphrase and then press “Enter”. You will enter the same passphrase a second time, then press “Enter”.
5. You will get a confirmation that the public key has been created and saved.
Upload the Public Key
1. In the same window, add the public key to the cluster. Replace the username with your CAM account name, and if you changed the name of your key, you will need to update it.
ssh-copy-id -i ~/.ssh/id_rsa.pub [username]@xanadu-submit-ext.cam.uchc.edu
2. You will be prompted for your password a final time, as well as the passphrase. You should now be able to access the cluster without password prompts.