Skip to content

Instantly share code, notes, and snippets.

@DaWe35
Created May 27, 2020 13:22
Show Gist options
  • Save DaWe35/5befd68b6084088647402093eb438d1d to your computer and use it in GitHub Desktop.
Save DaWe35/5befd68b6084088647402093eb438d1d to your computer and use it in GitHub Desktop.
VPS initial setup

Add user & disable root login

adduser USER
passwd USER
# add user to sudoers
usermod -aG sudo USER
# change user
su - USER
sudo nano /etc/ssh/sshd_config

Change #PermitRootLogin yes to PermitRootLogin no

sudo systemctl restart sshd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment