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!
#!/bin/bash
cat ~/.ssh/id_rsa.pub | ssh $1 'mkdir -p .ssh; cat >> .ssh/authorized_keys'
No comments:
Post a Comment