The basis of this is that your ID must be in the list of authorized hosts in the server. So, for password-less login to work, generate your public key, and append it to the authorized_hosts file in the server.

  • To create a public key, from terminal do
ssh-keygen -t rsa
  • To copy to authorized_hosts file do
cat ~/.ssh/ | ssh [email protected] 'cat >> ~/.ssh/authorized_keys' 

Test by

ssh [email protected]

If no password is asked, everything worked fine.

You can also do the following command to copy the key

ssh-copy-id [email protected] 

blog comments powered by Disqus

Sister Sites: GATE Overflow, GATE CSE Wiki, GATE CSE, Aptitude Overflow

This work is licensed under the CC By-SA 3.0 , without all the cruft that would otherwise be put at the bottom of the page.