Skip to content

Instantly share code, notes, and snippets.

@jayers99
Last active December 12, 2018 22:11
Show Gist options
  • Save jayers99/e7b66dd0ac62ba12a676f56a532eb96c to your computer and use it in GitHub Desktop.
Save jayers99/e7b66dd0ac62ba12a676f56a532eb96c to your computer and use it in GitHub Desktop.
username=
sudo adduser $username
sudo su $username
cd ~
mkdir .ssh
chmod 700 .ssh
touch .ssh/authorized_keys
chmod 600 .ssh/authorized_keys
vim .ssh/authorized_keys
# paste public key
exit
# list users by id
sort -n -t ':' -k3 /etc/passwd
# you might want to run the passwdNoExpire next
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment