Tuesday, October 6, 2009

SSH without password in Linux

Hi,

This is simple step by step explanation how to do SSH from one server to a remote machine without typing your password.

1. # ssh-keygen -t rsa (Press Enter Key three times) .

2. On your server create one directory ---> # mkdir ~/.ssh ( If exist please ignore).

3. Create .ssh directory to remote machine # ssh login_name@host or IP_Add mkdir -p .ssh

4. On server ---> # cd ~/.ssh ---> # cp id_rsa.pub authorized_keys

5. On remote machine ---> # ssh-keygen -t rsa (Press Enter Key three times) .

6. # cd ~/.ssh ---> # cp id_rsa.pub authorized_keys

7. copy and append server's id_rsa.pub to remote machine # cat id_rsa.pub | ssh remote host or IP 'cat >> .ssh/authorized_keys

8. Step no 6 and 7 repeat from Remote machine.

9. Now you can do login without password viceversa .
example login@host or IP of remote machine .


Email me your comments and queries.

Thanks and regards,

Anand B Mane.
email :- anandmane@yahoo.com