Passwordless SSH setup

I’d forgotten how to do this, so here’s another note.

To set up passwordless SSH, the easy way to do it is:

(on the local machine)

  • ssh-keygen -t rsa
  • Enter a passphrase if you want
  • ssh-copy-id -i ~/.ssh/id_rsa.pub username@remote
  • Enter your password, and now you should be able to login remotely without a password.

ssh-copy-id makes the process as simple as can be, and all the other tools (like scp) will now work without the password as well. You may also want to modify your ssh config file to include a hostname alias.

Post a Comment

Your email is never published nor shared. Required fields are marked *