RSA key pair generation
RSA keys are used to avoid the login prompt when you try to SSH to the server. Generating RSA keys is very simple.
Please follow the steps given below.
From the server1,
Press key to accept the default file location of /root/.ssh/id_rsa
Change the permission to 755 to the directory “/root/.ssh/id_rsa”
Now create a file “/root/.ssh/authorized_keys” on the target system.
From server1, copy the contents of the file “/root/.ssh/id_rsa.pub” to the file “/root/.ssh/authorized_keys2″ on server2. You can do it using the command “scp” as follows.
That’s all
Now you can connect the server2 from server1 through SSH without typing the password.
Leave a Reply
You must be logged in to post a comment.