How do I set up SSH keys for passwordless login?
On occasion, users prefer to set up password-less logins from their home or office computers, into the supercomputer. This would allow them to connect via SSH, or transfer files via SCP, without putting in a password every time.
NOTE: If you are enrolled in Two-Factor Authentication, you will still be required to enter both your password and verification code at every login. The instructions listed below will not change this.
If you choose to do this, please be very careful who has access to the computer you're coming in from, since anyone with access to that computer would be able to connect to the supercomputer, as if they were you!
In essence, the instructions below create a pair of keys: the "public" key, and the "private" key. The private key should be kept safe, and should never be copied outside your computer. Whoever has access to that private key can log into the supercomputer, as you, without a password. The public key, however, can be safely uploaded, which is necessary for these instructions.
Generate an SSH key (Unix-based systems)
On your system, execute the following from the command line, to generate the key.
ssh-keygen -t rsa
The defaults are to place the generated files in ~/.ssh
Copy the public key to the destination system (Unix-based systems)
Execute the following code, on your computer, to upload your public key.
ssh ssh.fsl.byu.edu 'cat - >> ~/.ssh/authorized_keys'
The code in the line above appends your public key to .ssh/authorized_keys. You can do this manually if you so choose. As stated previously, never copy your private key (the one that does not end in ".pub") outside your computer.
Be sure that your destination ~/.ssh directory and files have their permissions set correctly.
chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys
Using your ssh software, there is probably an easy way to generate a key and copy the public key to our systems. The entire public key (which should be just one line) must then be appended to the ~/.ssh/authorized_keys file on the destination system (create it if it doesn't exist).
Expand this wiki page if you know how to do this for non-Unix software
Software specific. If you know how, please add a section to this page for that software.