Mercurial > hg > config
comparison bin/add_ssh_key.sh @ 756:12f0be02e9cc
http://www.howtogeek.com/168147/add-public-ssh-key-to-remote-server-in-a-single-command/
| author | Jeff Hammel <k0scist@gmail.com> |
|---|---|
| date | Wed, 05 Aug 2015 08:44:23 -0700 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 755:14eee9200854 | 756:12f0be02e9cc |
|---|---|
| 1 #!/bin/bash -x | |
| 2 | |
| 3 # see http://www.howtogeek.com/168147/add-public-ssh-key-to-remote-server-in-a-single-command/ | |
| 4 | |
| 5 KEY=~/.ssh/id_rsa.pub | |
| 6 | |
| 7 for arg in $@ | |
| 8 do | |
| 9 cat "${KEY}" | ssh ${arg} 'cat >> .ssh/authorized_keys' | |
| 10 done |
