11May

Setting up ssh keys on OS X

Ok, i'm writing this post because I keep forgetting how to do this! The basic idea is that you want to be able to connect to servers via ssh and not have to keep typing a password in!

The following commands will generate your public key, and then add it to the server's collection of allowed public keys:


ssh-keygen -t dsa -N ''
cat ~/.ssh/id_dsa.pub | ssh deploy@myserver.com "cat - >> ~/.ssh/authorized_keys2"
 

Leave a comment