Login Into Your Server Using SSH Without Password on Linux
Normally we can connect remote server using SSH (Secure SHELL) for managing or execute programs on Linux. Also support to transferring files from a server to another server. This post will help you how to login into your server without entering password. This SSH keys increase more secure connection between two or multiple Linux servers.
Do you like to an automatic login from server 192.168.0.1 as user xxx to 192.168.0.2 as user yyy without enter any password.
Login into your server IP address : 192.168.0.1 with user xxx, then generate a pair of authentication keys using command ssh-keygen
Generating public/private dsa key pair.
Created directory '/home/xxx/.ssh'.
Your identification has been saved in /home/xxx/.ssh/id_dsa.
Your public key has been saved in /home/xxx/.ssh/id_dsa.pub.
The key fingerprint is:
The key's randomart image is:
+--[ DSA 1024]----+
| . |
| + .|
| .oo. =.|
| So.=+.o .|
| ..= o+ |
| oE+o . |
| .o .o.. |
| .. . .o |
Now, just create a directory to yyy user on 192.168.0.2
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.2' (RSA) to the list of known hosts.
Finally append xxx generated new public key to yyy on 192.168.0.2 .ssh/authorized_keys,
Then, we set the permission on .ssh directory and authorized_keys,
Finally, connect remote server via ssh without entering password.