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;
Written by Eric
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#