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 root@192.168.0.1
(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






