Saturday, August 13, 2011

Adding SSH keys

If you need an automatic login from host A to Host B please follow the below steps.

1) SSH into server A
2) Execute the below command
ssh-keygen -t rsa (dont give any input just hit enter for all questions, the private key and public will stored in the default location)
3) Copy the public key (/root/.ssh/id_rsa.pub) and save in the following file of remote host server B

.ssh/authorized_keys2
and change the ownership of this file to 640

No comments:

Post a Comment