Skip to content

Instantly share code, notes, and snippets.

@zoonderkins
Last active November 9, 2022 01:52
Show Gist options
  • Save zoonderkins/a992d926958b763e25c6a65aaaf76b97 to your computer and use it in GitHub Desktop.
Save zoonderkins/a992d926958b763e25c6a65aaaf76b97 to your computer and use it in GitHub Desktop.
Secure your SSH Debian

Secure your SSH on Debian 12

SSH hardern config

#Include /etc/ssh/sshd_config.d/*.conf
Port 2022
Protocol 2

PermitRootLogin yes
PubkeyAuthentication yes
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM no
StrictModes no
X11Forwarding yes
PrintMotd no
TCPKeepAlive yes
Subsystem sftp /usr/lib/openssh/sftp-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment