Last Updated: February 25, 2016
·
270
· etsauer

Mass Push of Public Key

$ servers="server01 server02 mybox04 [... etc.,etc...]."
$ key=`cat /path/to/your/public_keyfile`
$ for server in $servers; do ssh [your username]@${server} "mkdir -p ~/.ssh && echo ${key} >> ~/.ssh/authorized_keys"; done;