/ Published in: Bash
URL: http://snippets.dzone.com/posts/show/2335
Instead of ~/.ssh/idrsa.pub, you can choose any location on your local machine where your public key lives. You may need to adjust the file permissions on remote authorizedkeys aftwterwards, depending on the configuration of the remote ssh server.
Expand |
Embed | Plain Text
ssh user@host 'mkdir ~/.ssh; echo '`cat ~/.ssh/id_dsa.pub`' >> ~/.ssh/authorized_keys'
You need to login to post a comment.
