SSH login without password using RSA key authentication

With RAS key authenticating mechanism, you can login (using SSH ) to a server without providing the password. RSA is an algorithm for public-key cryptography. This process is most suitable for working automated process. For automating backups or run some jobs frequently in a trusted server this will contribute an important role. And the other advantage of RSA key authentication is, it is helpful to connect to the servers which change password frequently. Even if the User Password is changed in the server will not affect the paired computers.

Configure server and client with RSA Key

Create Public and private key using ssh-keygen

#ssh-keygen
It will ask for the location to save the key
Default location : /root/.ssh/id_rsa
Next It will ask passphrase. (u can do it without a password also, for that just enter )
It will create Private key and public key. See the out put
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.

 

Upload public key to the server which you want to upload

#ssh-copy-id -i /root/.ssh/id_rsa.pub [email protected]
(Here 192.168.0.1 is a example ip address)
It will automatically copy your public key to .ssh/authorized_keys

 

You can upload the public key to multiple servers using same command ( ssh-copy-id ). Next time onwards the server will not ask the user ID and password

About Albin Sebastian

I am a Technology Blogger, System Administrator by profession and webmaster by passion. Technology blogger, Active in Online and offline tech communities.

Check Also

Nslookup correct reply

NSlookup incorrectly appending domain name in windows 10

Noticed this problem in Windows 7 and windows 10 systems after adding the system to …