3 ms·
I don't care if it security by obscurity or not, it's not stopping a targetted attack and it's confusing the people who need to use SSH much more than the attac
by mrweasel 6y ago
I don't care if it security by obscurity or not, it's not stopping a targetted attack and it's confusing the people who need to use SSH much more than the attackers.
If your woken up at 3AM because something is wrong with some random server, you want to be able to access it fairly easily. Maybe you and your team monitor servers for customers, who decide that SSH should be moved to some random port. Even with the best documentation in the world, setting the port on their SSH connection is something people will miss.
If you're able to communicate that you moved the SSH port to your team, then you're most likely also able to simply whitelist the right IPs in your firewall. Just do that instead and leave the port at 22.
We manage a ton of servers for random clients and they just need to whitelist two or three IPs depending on the team(s) that needs access. Don't expose SSH to the entire internet, unless you need random people access it and in that case moving the port just seem to be a support case waiting to happen when someone forgets to set the port.
- paxys 6y agoExactly. Standards exist for a reason. The only thing you are obscuring is real authorized access. Bots don't care whether the service is on port 22 or 38692, they will just probe them all.
- erdewit 6y agoI used to get gigabytes of logfiles from the SSH probes, but that has stopped since moving the port. That was the only reason for moving.
- lima 6y ago> Bots don't care whether the service is on port 22 or 38692, they will just probe them all. Only if they really, really care about a particular host or IP range.
- vorpalhex 6y agoYou can do both, and in general most management teams should be at the very least using ssh configs if not full inventory management ala ansible/et al. Whitelisting IPs may work with your corporate vpn, it most certainly does not work for hobbyists on consumer ISPs. Moving the port deflects a lot of low effort attacks, and if the ssh server is otherwise still well secured then provides no harm and real benefit.
- mrweasel 6y agoDepending on what your tasks are, distributing ssh configs to 100+ people isn't that feasible, but yes, ssh configs help, but you're back to ensuring that the information is correctly distributed. Chances are that the servers and users are managed somehow, while laptops and workstation may or may not be. You could use a jump host, but then why not just whitelist the IP for the jump host? Just disabling password logins is just as good or better than moving the port. Don't want your logs to explode: logrotate! If it's just for a hobbyist on a consumer ISP then sure move your port, implement port knocking, use VNC, I don't care. For business, moving the SSH port is a weird thing to do, it's not that effective and you should already have other security measures in place that makes moving a port pointless.
- the8472 6y agoYou could probably do something like the following in your ssh_config. Of course that's assuming that all the servers are adhering to some internal standard instead of the standard standard. Host *.corporate.tld Port 38237
- mrweasel 6y agoThat's also assuming that all your servers are under one domain. We manage other peoples servers, so they are normally under that customers domain, rarely ours.
- Yizahi 6y agoI call this a non-issue. We use not default SSH ports and every single person in engineering, support and customer integrators are just fine with it. When 99% of all equipment are on non-default ports everyone just expect to look up port before attempting connection. And we have a lot of servers in use. What you are talking about is when company used port 22 and then some minority of server were changed, and some don't and it wasn't communicated and caused a mess. But when done company wide on a majority of equipment it becomes just thing we do, not a problem at all.
- mrweasel 6y agoI like that. If you do move the SSH port, do it everywhere and randomly, then it's not unexpected. I still feel that other security measure should be taken first, most of which would make moving the port pointless.
- jcynix 6y ago> Don't expose SSH to the entire internet [...] Yes, and that's what tools like tcp wrapper (or iptables) are there for. I use it to disallow whole networks from Brazil, China, etc so they don't even reach sshd to talk to it. Less log clutter, less to do for fail2ban if installed.