Dustin Boswell - Brain Dumps about Computers, Programming, and Beyond
dustwell.com About Me Past Academic Work Photo Album Links I Use
Articles by Me Subscribe: RSS
Pair programming + screen Dear VirginAmerica.com SSH keys in 2 easy steps "An hour" vs. "A hour" How to hash passwords Snapshotting with Rsync MacBook Pro Sharp Edge Fixing Your Flaky Intennet How X-over-SSH works Drinking Distilled Water Politician != Decider Understanding iTunes files My Audi A4 Gas Mileage
SSH keys in 2 easy steps February 13, 2010
These are simple instructions that will let you ssh from one machine to another without needing to type your password.

Step 1) Generate your public signature

On your local machine (where you are ssh-ing from) type:
ssh-keygen
(Then hit ENTER to accept the default output file of ~/.ssh/id_rsa.pub and ENTER again twice if you're lazy and want to use a blank passphrase.)

Step 2) Copy your public signature to the server

Again, from your local machine, type:
cat ~/.ssh/id_rsa.pub | ssh remote_user@remote.example.com "cat >> ~/.ssh/authorized_keys"
(but replace remote_user@remote.example.com with your actual user and server.)

This fancy shell appends the contents of your public signature to the end of the ~/.ssh/authorized_keys file on the server.

You're done!

Next time you ssh into the server
ssh remote_user@remote.example.com
It should do this without prompting for any passwords.
blog comments powered by Disqus