How do you keep sshd itself secure over time?
IntermediateProductionSSH & Access Hardening
Answer
Patch OpenSSH promptly (regreSSHion CVE-2024-6387 was a remote unauthenticated RCE in sshd), remove weak algorithms, and audit regularly:
ssh -V
sudo sshd -T | grep -E '^(ciphers|macs|kexalgorithms)'
ssh-audit server.example.com # third-party scanner
Also restrict SSH at the network layer so a future zero-day is not reachable from the internet.
More on SSH & Access Hardening
What are the first sshd_config changes you make on a new production server?BeginnerWhy use a drop-in file in /etc/ssh/sshd_config.d/ instead of editing sshd_config?IntermediateWhy disable SSH password authentication entirely?BeginnerShould you change the SSH port from 22?IntermediateWhat are SSH certificates and why do large fleets use them?AdvancedHow do you restrict what a specific SSH key can do?Advanced