This is 100% the way to go. I spun up a new server for a public-facing site on my VPS and I wondered if I really needed fail2ban. Within ten minutes of setting it up it had already blocked four people.
Don’t open port 22 if you can help it. Use it on your local network and VPN in if you need to use it offsite.
I just don’t put SSH on the internet at all.
This is 100% the way to go. I spun up a new server for a public-facing site on my VPS and I wondered if I really needed fail2ban. Within ten minutes of setting it up it had already blocked four people.
Don’t open port 22 if you can help it. Use it on your local network and VPN in if you need to use it offsite.
This is actually solid advice to quell any worries