Last Updated: February 25, 2016
· jasdeepsingh

Easily Enable Password-less SSH Logins

I absolutely hate entering in my passwords to different servers I SSH into. And with so many servers at our disposal. I cannot remember the passwords to them all.

Here's a handy trick to quickly and painlessly add your public SSH keys to your servers ~/.ssh/authorized_keys

$ ssh password: 

Use this two liner to quickly copy over your public SSH keys to enable password-less logins:

$ brew install ssh-copy-id
$ ssh-copy-id

Now, you can do just -

$ ssh

Enjoy, I hope you find it handy!

PS: Offcourse, change root to your own username

3 Responses
Add your response

This method does use the Public-Key encryption mechanism. The little tool copies over your public key to your servers authorized_keys.

over 1 year ago ·

If you're using Windows or don't have access to ssh-copy-id, you can just copy and paste your key in to ~/.ssh/authorized_keys

over 1 year ago ·

If manually adding the file, be sure to set it's permissions to 600

chmod 600 ~/.ssh/authorized_keys


over 1 year ago ·