Last active
September 16, 2018 01:27
-
-
Save chaspy/9211356ee3775c91363656c0dbaf659f to your computer and use it in GitHub Desktop.
isucon_addkey.sh
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
#!/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