Last active
December 12, 2018 22:11
-
-
Save jayers99/e7b66dd0ac62ba12a676f56a532eb96c to your computer and use it in GitHub Desktop.
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
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