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 serverssh remote_user@remote.example.comIt should do this without prompting for any passwords. blog comments powered by Disqus