Add SSH Key to authorized_keys in one line

July 26, 2011    authorized_keys known hosts rsa ssh

This is a great little one liner, to publish your local SSH key to any server you need to work with in one simple line.

*Note you will be asked to verify your password the first time round.

cat ~/.ssh/id_rsa.pub | ssh root@example.com 'cat - >> ~/.ssh/authorized_keys'

blog comments powered by Disqus