Skip to content

Instantly share code, notes, and snippets.

@twalling
Created July 29, 2014 15:17
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 twalling/a6f171b21c5c3c49556f to your computer and use it in GitHub Desktop.
Save twalling/a6f171b21c5c3c49556f to your computer and use it in GitHub Desktop.
sudo useradd -m -U -s /bin/bash USERNAME
sudo mkdir /home/USERNAME/.ssh
sudo chmod 700 /home/USERNAME/.ssh
sudo touch /home/USERNAME/.ssh/authorized_keys
sudo chown -R USERNAME:USERNAME /home/USERNAME/.ssh
sudo chmod 600 /home/USERNAME/.ssh/authorized_keys
if sudo
sudo usermod -a -G sudo USERNAME
# echo update /etc/ssh/sshd_config
# echo AllowUsers USERNAME
# echo sudo passwd USERNAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment