Generate Keys On Server
cd .ssh
ssh-keygen -t rsa
Note: Name this different from "id" when asked. In this case I named it r1
cat r1_rsa.pub >> ~/.ssh/authorized_keys
Now we need to make a few configuration changed to SSHD config on the server:
nano /etc/ssh/sshd_config
PubkeyAuthentication yes (make sure # is removed)
PasswordAuthentication no (make sure # is removed)
service sshd restart
Grab the contents of r1_rsa
cat r1_rsa
Copy the output.
On your Linux machine do:
cd .ssh
nano r1_rsa
Paste in the contents of r1_rsa and save
chmod 600 r1_rsa
You should now be able to SSH using keys:
ssh -i r1_rsa server.ip.here
