Ssh ssl key login

From TheBestLinux.com
Revision as of 22:22, 11 May 2015 by Jamie (talk | contribs)
Jump to navigation Jump to search

SSH Password-Less Setup

Create private & public keys:

[jamie@server ~]$ ssh-keygen -b 4096 



Save private key in VERY VERY SAFE PLACE, as well as in /etc/ssh on the server which created it! Save public key in VERY VERY SAFE PLACE, as well as upload it to any server needing to log into using this key, by appending the /home/jamie/.ssh/authorized_keys file using cat. The public key uploaded to servers needing it to log into should be renamed to something that makes the key human identifiable, aka: server.dawgland.com.id_rsa.pub which will allow ssh login without using a password:

[jamie@server ~]$ scp server.dawgland.com.id_rsa.pub jamie@ermarc.net
[jamie@server ~]$ ssh jamie@ermarc.net
[jamie@server ~]$ cat server.dawgland.com.id_rsa.pub >> /home/jamie/.ssh/authorized_keys
[jamie@server ~]$ chmod 600 /home/jamie/.ssh/authorized_keys

This server.dawgland.com.id_rsa.pub key can be uploaded to any and all servers needing ssh access to and configured as above. This will allow you to log into the server without being prompted or needing to enter in your password!