Hacker News new | ask | show | jobs
by account_taken 4888 days ago
Isn't this simpler?

ssh user@host 'mkdir ~/.ssh;echo '`cat ~/.ssh/id_dsa.pub`' >> ~/.ssh/authorized_keys'

1 comments

That works for your own key, but if you visit `http://github.com/<username>.keys`, you can get that user's pubkeys. Likewise for Launchpad at `https://launchpad.net/<username>/+sshkeys`. This tool pulls keys from these locations so that you can add other users to your servers.