Skip to content

Instantly share code, notes, and snippets.

@makidoll
Last active August 11, 2022 23:58
Show Gist options
  • Save makidoll/4ef9f0df36e0e718edf4be33e863a130 to your computer and use it in GitHub Desktop.
Save makidoll/4ef9f0df36e0e718edf4be33e863a130 to your computer and use it in GitHub Desktop.
Good SSH Settings

Good SSH Settings

Add key to ~/.ssh/authorized_keys

Changes to /etc/ssh/sshd_config:

  • Protocol 2 add above Port 22
  • Port 9001
  • PasswordAuthentication no
  • X11Forwarding no
  • ClientAliveInterval 300
  • MaxAuthTries 3
  • PermitRootLogin no

Then run sudo systemctl restart ssh

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