Linux: Log into a server using SSH without entering password

One of those little handy-things-to-have is the ability to log into a remote computer without having to enter in the password every time.

To do that, we have to generate a pair of authentication keys for the computers A and B.

On computer A, make sure you have a folder called ".ssh". If not, create it.

  • Type in "ssh-keygen -t rsa"
  • Save it to "~/.ssh/id_rsa"
  • Don't enter in a passphrase (just press enter)
  • Open ".ssh/" and copy the contents.

Now on computer B, create a folder called ".ssh" (if it doesn't already exist).

Create "~/.ssh/authorized_keys" and paste in the contents of Save and exit.

Now you should be able to connect from computer A to B without any problems.

[ Source ]

Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog