Created
June 11, 2013 05:10
-
-
Save jimnanney/5754588 to your computer and use it in GitHub Desktop.
First attempt at a script to create a pair programming user setup script.
This file contains hidden or 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 | |
| HOST=jimnanney | |
| USER=$1 | |
| sudo su -c "useradd -m $USER" | |
| sudo su $USER -c "mkdir -p ~/.ssh; \ | |
| chmod 700 ~/.ssh; \ | |
| curl https://github.com/$USER.keys >~/.ssh/authorized_keys; \ | |
| curl https://github.com/$HOST.keys >>~/.ssh/authorized_keys; \ | |
| chmod 600 ~/.ssh/authorized_keys" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment