passwordless ssh

I can’t believe I never set this up. I ssh to a few of my school servers all the time. I always have to enter my password to authenticate. I just found out I could authenticate with a key file instead of entering my password. I found the information from here and here. To set up, execute:

# for no passphrase, use
ssh-keygen -b 1024 -N ""
# safer to use with passphrase, and make it long (24+ characters)!
ssh-keygen -t rsa -b 4096
ssh-copy-id login@server
# you'll have to enter your password one last time to get it there.

On my Mac OS X, I did not have ssh-copy-id, but from this link I found a shell script for it here.

About Vinh Nguyen

Statistician

1 comment

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>