Re:Obscurity: Does Changing Your SSH Port Lower Your Risk?
by danielrm26 on Friday February 18, 2011 @12:26PM
(#2236319)
You're assuming a human attacker, which is not the case for the vast majority of probes and attacks. Bad guys don't generally sit there with a port scanner going from IP to IP.
This is all scripted stuff we're talking about.
Re:Obscurity: Does Changing Your SSH Port Lower Your Risk?
by teaspoon on Friday February 18, 2011 @01:51PM
(#2236685)
Scripts can't implement conditional behavior?
Re:Obscurity: Does Changing Your SSH Port Lower Your Risk?
by danielrm26 on Friday February 18, 2011 @03:10PM
(#2237026)
It's not a matter of "can't"; it's a matter of "don't". My understanding is that scripts check a few places and move on. They're not AI-scripted human replacements that start scanning the entire Internet on all ports once they get an RST or a drop on 22.
He should have removed "Port 22" from the config file to get any significant results. Right now it only says that if an attacker gets an SSH-like answer on port 22, it's very unlikely he'll try on port 24 as well.
This is unhelpful because if there's a bug in OpenSSH, then even an OpenSSH "reject all on port 22" configuration* might be compromised.
I think it's very much more likely that an attacker, when not getting any answer (or being instantly rejected) on port 22, will portscan the server to see if any other ports are open, and then try the non-standard port, which in this case is 24.
* I'm unsure if this is possible in SSH (like reject all root logins), but anything non-standard might trigger the "no SSH @ 22" response, so I'm hypothesizing a best-case-scenario config.