Skip to content

Instantly share code, notes, and snippets.

@niclaslindstedt
Last active October 18, 2018 19:49
Show Gist options
  • Save niclaslindstedt/5c65be3cf5b6314172a455e453a7d856 to your computer and use it in GitHub Desktop.
Save niclaslindstedt/5c65be3cf5b6314172a455e453a7d856 to your computer and use it in GitHub Desktop.
safe sshd configuration (add to bottom of config)
ClientAliveInterval 360
ClientAliveCountMax 0
PermitEmptyPasswords no
PermitRootLogin no
Protocol 2
Port 3089
PasswordAuthentication no
AuthenticationMethods publickey
PubkeyAuthentication yes
IgnoreRhosts yes
HostbasedAuthentication no
LoginGraceTime 30
MaxAuthTries 3
UsePAM no
UseDNS no
# AllowUsers user1 user2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment