Before generating new SSH key pair first check if you have an SSH key on your local machine.
If there are existing keys, please move to Step 3
ssh-keygen -t rsa
Press Enter to accept the default file location and file name.
ssh-keygenwill ask you to type a secure passphrase. This is optional. If you don't want to use a passphrase just press
Verify the SSH keys are generated correctly, you should see two files
DO NOT upload or send the private key.
You will now need to copy your public key to Oscar. There are two ways to acomplish this.
If your OS comes with the
ssh-copy-idutility, then you'll be able to copy your public key into Oscar as follows:
You will be prompted for a Password. The public key will be appended to the
authorized_keysfile on Oscar.
If you used a custom name for your key instead of the default
id_rsathen you'll need pass the name of your key to
ssh-copy-id -i ~/.ssh/<keyname> <username>@ssh.ccv.brown.edu
If your system does not come with the
ssh-copy-idutility installed, then you'll need to copy your public key by hand.
- 1.Get the contents of
id_rsa.pubfile. One option is to use
catin your teminal
- 2.Copy the contents of this file to your clipboard, as we need to upload it to Oscar.
- 3.Login into Oscar via regular ssh
ssh <username>@ssh.ccv.brown.edu. Once you are on the login node, open the authorized_keys file with your text editor of choice e.g.,
nano ~/.ssh/authorized_keysAdd your public keys to end of this file. Save and exit.
If everything went well, you will be logged in immediately withouth prompting you for a password.