Created
May 25, 2015 14:31
-
-
Save jlongman/3cd87d7952f79892b26c to your computer and use it in GitHub Desktop.
publish ssh key to host
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # there's a tool on Linux that does similar to this, not on FreeBSD | |
| ssh_publish(){ | |
| host=$1 | |
| shift | |
| ssh-keygen -R $host | |
| cat ~/.ssh/id_dsa.pub | ssh -oStrictHostKeyChecking=no $host $@ "mkdir -p .ssh && cat >> .ssh/authorized_keys" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment