Monday, January 28, 2008

Setting up Remote SSH with shared keys

This little bit of code is quite nice. I put it in a file called setup_ssh in my ~/bin directory and life was much easier. Now when I want to setup shared key authentication i just type 'setup_ssh user@host' and put in my password. Thats it!

cat ~/.ssh/ | ssh $1 'mkdir -p .ssh; cat >> .ssh/authorized_keys'

No comments: