Skip to content

Instantly share code, notes, and snippets.

@DPS0340
Created February 3, 2023 13:25
Show Gist options
  • Save DPS0340/d8d1922403aa41186d30c89c9a9d29c8 to your computer and use it in GitHub Desktop.
Save DPS0340/d8d1922403aa41186d30c89c9a9d29c8 to your computer and use it in GitHub Desktop.
disable password auth on ssh server
sudo sed -i -E 's/#?PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo service ssh restart
sudo service sshd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment