News for hackers. Stuff that matters.
Re:Security through obscurity is underrated by slooonz on Sunday October 23, 2022 @05:34PM (#33310496)
Using a random port for SSH (or even "better", port knocking) is a "clever trick", until you forget the one you used for that server that quietly runs on which you log once every two years. Then it can range from minor annoyance to major PITA.

Security by obfuscation has the potential to confuse some (mostly dumb) attackers, but it has also the potential to confuse your future self, for VERY minor benefits (since everyone agrees but most of your security should not come from security-through obfuscation anyway).

Hence, avoid.

Re:Security through obscurity is underrated by smitty1e on Sunday October 23, 2022 @06:33PM (#33310938)
One would think that if a list of services were going to be bound to non-standard ports, that would be an occasion to document very, very carefully.
Re:Security through obscurity is underrated by alerighi on Sunday October 23, 2022 @06:47PM (#33311041)
You can maintain a .ssh/config file with all the port that you used (and backup it) or use always the same custom port.

Anyway, it is useless but it can avoid all sort of bots trying out common login to your SSH server, that consumes resources (even if minimal) and fills your logs.

Re:Security through obscurity is underrated by anjbe on Sunday October 23, 2022 @07:07PM (#33311181)
> You can maintain a .ssh/config file with all the port that you used (and backup it)

Once you start distributing config files to all your clients you might as well switch to keypair authentication, which so completely reduces risk of intrusion that leaving sshd on 22 simply does not matter.

> that consumes resources (even if minimal)

I suspect practically immeasurable.

Re:Security through obscurity is underrated by amelius on Monday October 24, 2022 @05:30AM (#33314492)
How do you pick a good port number that doesn't clash now and in the future?

Ps: it is a disgrace that the network/kernel still uses port numbers rather than names, which would be much more flexible.

Re:Security through obscurity is underrated by hotpotamus on Sunday October 23, 2022 @06:53PM (#33311096)
I would say that every attacker I've ever encountered was dumb in the sense that it's a bot just scanning around. For ssh, I'm amazed by 2 things - 1, how quick a new server with 22 open on a public IP will be found and attempted to be compromised by brute force guessing, and 2, how changing the port (even to an obvious one like 2222) will eliminate all that noise.

I suppose you could say that the attackers are filtering out anyone who has done some basic hardening, but I suspect the truth is mostly more mundane - the attackers just aren't that motivated/clever; at least the ones who mass scan the internet trying to compromise ssh.