Skip to content

Instantly share code, notes, and snippets.

@chaspy
Last active September 16, 2018 01:27
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 chaspy/9211356ee3775c91363656c0dbaf659f to your computer and use it in GitHub Desktop.
Save chaspy/9211356ee3775c91363656c0dbaf659f to your computer and use it in GitHub Desktop.
isucon_addkey.sh
#!/bin/bash
set -eux
set -o pipefail
user=$1
# for ubuntu
adduser ${user}
gpasswd -a ${user} wheel
sudo -u ${user} mkdir /home/${user}/.ssh
curl -f https://github.com/${user}.keys | tee -a /home/${user}/.ssh/authorized_keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment