Skip to content

Instantly share code, notes, and snippets.

@lonnen
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lonnen/9714935 to your computer and use it in GitHub Desktop.
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
#!/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