Skip to content

Instantly share code, notes, and snippets.

@steebchen
Created December 11, 2018 03:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steebchen/3cf8d019b9c0615eeac65f16c4fd1807 to your computer and use it in GitHub Desktop.
Save steebchen/3cf8d019b9c0615eeac65f16c4fd1807 to your computer and use it in GitHub Desktop.
sudo sed -i "s/#\{0,1\}Port .*/Port xxxx/" /etc/ssh/sshd_config
sudo sed -i "s/#\{0,1\}PasswordAuthentication yes/PasswordAuthentication no/" /etc/ssh/sshd_config
service sshd reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment