SSH is the front door to your server, and it's constantly probed by automated attacks — a few configuration changes close most of the gap.
Disable Root Login
Require logging in as a regular user and using sudo for admin tasks, rather than allowing direct root access.
Use SSH Keys, Not Passwords
Key-based authentication is dramatically harder to brute-force than even a strong password.
Change the Default Port
Moving off port 22 doesn't stop a targeted attacker, but it significantly cuts down the automated scanning noise your server sees.
Limit Login Attempts
Tools like Fail2Ban automatically block IPs after repeated failed login attempts, slowing brute-force attempts to a crawl.
Español
Deutsch