OpenSSH Security in Short
OpenSSH has a very good security record, so a serious flaw is rare and widely reported when it happens: regreSSHion in 2024, and SSHole in 2026. Because port 22 faces the internet on most servers, attackers scan for vulnerable versions within hours.
How to Keep OpenSSH Patched
- Update through your distribution, then restart
sshd. Existing sessions stay open. - Use SSH keys and turn off password logins (
PasswordAuthentication no). That removes a whole class of attacks. - Limit who can reach port 22 with a firewall or VPN where you can.