Friday, September 26, 2008

ssh without password

This Procedure for do the ssh for without asking password only for One server
a@A:~> ssh-keygen -t rsa
Now use ssh to create a directory ~/.ssh as user b on B. (The directory may already exist, which is fine):a@A:~> ssh b@localhost mkdir -p .sshb@localhost's password:
Finally append a's new public key to b@B:.ssh/authorized_keys and enter b's password one last time:a@A:~> cat .ssh/id_rsa.pub ssh b@B 'cat >> .ssh/authorized_keys'b@B's password:
From now on you can log into B as b from A as a without password:a@A:~> ssh b@B hostnameB
=====================================================================================

Login in ServerA
Go to Home dircetory of user.
scp /home/oracle/.ssh/id_rsa.pub ServerB:/home/oracle/.ssh/authorized_keys
Then you will able to login without asking password to SerevrB.
You can login ServerB
run the command
ssh-keygen -t rsa
scp /home/oracle/.ssh/id_rsa.pub ServerA:/home/oracle/.ssh/authorized_keys
Then you will able to login without asking password to SerevrA

No comments: