Skip to content

Instantly share code, notes, and snippets.

@fionn
Created July 12, 2022 16:32
Show Gist options
  • Save fionn/04cfb1d57c4dee0ccfabdddfcffce840 to your computer and use it in GitHub Desktop.
Save fionn/04cfb1d57c4dee0ccfabdddfcffce840 to your computer and use it in GitHub Desktop.
SSHd hardening
PermitRootLogin no
PasswordAuthentication no
KbdInteractiveAuthentication no
AllowAgentForwarding no
MaxAuthTries 1
MaxSessions 3
KexAlgorithms sntrup761x25519-sha512@openssh.com,curve25519-sha256,curve25519-sha256@libssh.org
HostKeyAlgorithms ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com
Ciphers chacha20-poly1305@openssh.com
MACs umac-128-etm@openssh.com,hmac-sha2-512-etm@openssh.com
PubkeyAcceptedAlgorithms ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment