Skip to content

Instantly share code, notes, and snippets.

@weldpua2008
Created January 15, 2017 08:38
Show Gist options
  • Save weldpua2008/b41ce8a3bcbc8b21d22868028c6dcdbb to your computer and use it in GitHub Desktop.
Save weldpua2008/b41ce8a3bcbc8b21d22868028c6dcdbb to your computer and use it in GitHub Desktop.
How to manage users
# SSH
# Disable root login in SSH
sed -i "s/^PermitRootLogin.*/PermitRootLogin no/g" /etc/ssh/sshd_config
# Disable
sed -i "s/^PasswordAuthentication.*/PasswordAuthentication no/g" /etc/ssh/sshd_config
# How to disable user password
sed -i "s/^user1.*/user1::16887::::::/g" /etc/shadow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment