Last active
August 29, 2015 13:57
-
-
Save lonnen/9714935 to your computer and use it in GitHub Desktop.
register a bunch of pubkeys with sshcommand. takes 1 arg, a filename where the file contains a username, followed by one or more ssh keys, each on its own line, followed by the next username, and so on
This file contains 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
#!/usr/bin/env bash | |
name=""; | |
key=""; | |
while read line; do | |
if [[ $line == ssh* ]]; then | |
key=$line | |
echo $key | sshcommand acl-add dokku $name | |
else | |
name=$line | |
fi | |
done < $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment