Every bot on the internet knows that SSH lives on port 22. It’s the first door they knock on. Within minutes of spinning up a fresh Linux server, you’ll see login attempts from IPs you’ve never heard of, hammering away at the default SSH port number with dictionary attacks. The logs fill up fast.
Changing the default SSH port won’t make your server invincible. Let’s be clear about that. But it kills the vast majority of automated brute force noise, and that alone is worth the two minutes this takes. Think of it as moving your front door to a side street that script kiddies don’t bother walking down.
This guide walks you through every step: picking a new port, editing sshd_config, updating your firewall rules, restarting the service, and confirming it all works. Nothing fancy. Just the commands you need on a Linux VPS.
