Last active
September 30, 2015 20:20
-
-
Save gregjhogan/91e717693f6c11c29931 to your computer and use it in GitHub Desktop.
user setup script
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
NEW_USER= | |
sudo useradd $NEW_USER | |
sudo mkdir /home/$NEW_USER/.ssh | |
sudo chown $NEW_USER:$NEW_USER /home/$NEW_USER/.ssh | |
sudo chmod 700 /home/$NEW_USER/.ssh | |
sudo touch /home/$NEW_USER/.ssh/authorized_keys | |
sudo chown $NEW_USER:$NEW_USER /home/$NEW_USER/.ssh/authorized_keys | |
sudo chmod 600 /home/$NEW_USER/.ssh/authorized_keys | |
sudo vim /home/$NEW_USER/.ssh/authorized_keys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment