Difference between revisions of "Ssh ssl key login"

From TheBestLinux.com
Jump to navigation Jump to search
Line 4: Line 4:
 
ssh-keygen -b 4096
 
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 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 somethign that makes the key human identifiable, aka: server.dawgland.com.id_rsa.pub which will allow ssh login without password from new home Xenon server shell to any other server I've configed as root superuser:
+
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:
 
<pre style="color:blue">
 
<pre style="color:blue">
[root@localhost ~]#scp server.dawgland.com.id_rsa.pub jamie@ermarc.net
+
[jamie@server ~]$ scp server.dawgland.com.id_rsa.pub jamie@ermarc.net
[root@localhost ~]#ssh jamie@ermarc.net
+
[jamie@server ~]$ ssh jamie@ermarc.net
[root@localhost ~]#cat server.dawgland.com.id_rsa.pub >> /home/jamie/.ssh/authorized_keys
+
[jamie@server ~]$ cat server.dawgland.com.id_rsa.pub >> /home/jamie/.ssh/authorized_keys
 +
[jamie@server ~]$ chmod 600 /home/jamie/.ssh/authorized_keys
 
</pre>
 
</pre>
 
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!
 
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!

Revision as of 22:20, 11 May 2015

SSH Password-Less Setup

Create private & public keys: 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!