Skip to content

Instantly share code, notes, and snippets.

@gregjhogan
Last active September 30, 2015 20:20
Show Gist options
  • Save gregjhogan/91e717693f6c11c29931 to your computer and use it in GitHub Desktop.
Save gregjhogan/91e717693f6c11c29931 to your computer and use it in GitHub Desktop.
user setup script
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