May 12 2011

Easy ssh key setup

I seem to need to look up this little gem from time to time, so I thought I should just post it here so I can find it easily. If you want a dead simple way to send your ssh key to a remote server so that you can use key based authentication, just run the following command.

cat .ssh/id_rsa.pub | ssh [email protected] "cat >> .ssh/authorized_keys2"

Obviously you need to have an existing key generated and you need to adjust for the type of key you have and the server user/address.