Using RSA encryption keys to sign into a remote server via SSH

Written on February 2, 2015

Generate an RSA key and copy the public version of that key to the remote server as follows:

Create a key set

If you already have a key set up then you can ignore this step.

In the terminal enter: ssh-keygen -t rsa

Accept the default location and add a custom passphrase when prompted.

Copying your public key to the remote server

cat ~/.ssh/id_rsa.pub | ssh [email protected] "mkdir ~/.ssh; cat >> ~/.ssh/authorized_keys"

Where user is your username and machine is the IP address of the remote server.