2. Next he talks about this non-root listener issue. He claims that you shouldn’t run your SSH daemon on a non-privileged port because anyone can spin up a daemon up there. Great point, except you can still do that even if you run your main one on 22. I don't think I understand this point at all. What is it that you're trying to say? Are you sure you understood the original post's point? djc@capelis.dj:~$ nc -l -p 14…
Run it on a port where (port != 22 && port I run my SSH daemons on port 1022. It reduces brute-force attacks significantly without reducing security in any way that I'm aware of. I also have a ~/.ssh/config file in my laptop that tells SSH to use port 1022 whenever I'm connecting to one of my own remote machines so I don't even need to type anything extra when I use ssh, rsync, etc.
Why Putting SSH On Another Port is a Good Idea
101–110 of 192 posts
Re: Why Putting SSH On Another Port is a Good Idea
#102Earlier quoted context omitted.
Turning off passwords and only using keys also mitigates the standard brute force attacks that happen. Frankly I'd much rather do that then have my server on a non-standard port.
> Frankly I'd much rather do that then have my server on a non-standard port. Frankly, the problems with key security and management are much worse than are being discussed. Using only keys is fine as long as your keys are secure and you know which is which and control all access and immediately remove any key which needs to be. In a complex environment, this is extremely difficult and more prone to security breaches…
On the other hand, the last place I consulted for had their private key for production checked in to the main git repo, unencrypted. :-/
Re: Why Putting SSH On Another Port is a Good Idea
#103Earlier quoted context omitted.
To be fair, you could get the advantages of both by running SSH on a different privileged port than 22. Many of the lower numbered even-numbered ones are good options as for historical reasons those are all mostly unassigned. (Pretty much any even number below 16 isn't used by much.) But I agree, the privileged ports point isn't something that should be brushed aside.
> To be fair, you could get the advantages of both by running SSH on a different privileged port than 22. ephemeral port range are a tunable at least on FreeBSD. However tuning stuff like this is fraught with disaster consider how difficult it is to guess an ssh password vs all things that can go wrong when changing sshd's listening port. But do it if you want, I bill by the hour. galacticdominator% sysctl net.inet.i…
Re: Why Putting SSH On Another Port is a Good Idea
#104Re: Why Putting SSH On Another Port is a Good Idea
#1052. Next he talks about this non-root listener issue. He claims that you shouldn’t run your SSH daemon on a non-privileged port because anyone can spin up a daemon up there. Great point, except you can still do that even if you run your main one on 22. I don't think I understand this point at all. What is it that you're trying to say? Are you sure you understood the original post's point? djc@capelis.dj:~$ nc -l -p 14…
Privileged ports are why I disagree with this rebuttal. I want some assurance that when I ssh into a box, that I'm hitting a true and sanctioned sshd.
If you run ssh on a static port, then it really does not matter whether it is 22 or 2200, as long as it remains static, and everyone knows the correct port.
If it turns out that that daemon is logging your passwords, then someone has already compromised your host.
Re: Why Putting SSH On Another Port is a Good Idea
#106Ouch, camouflage on a tank is a good analogy. Nice response post. In addition to, as the author encourages, being "weary of the 'by obscurity'" argument (as I'm sure we all already are), I would also advocate being wary of it :)
Seriously, I think "wary" might be the most-misspelled word in the English language right now....
Re: Why Putting SSH On Another Port is a Good Idea
#107He's overreacting a bit. Port knocking is not just an "obscurity layer". It's more akin to a PIN or weak password. The condescending opening is a tip off ("people who almost understand the topic").
Now running SSH on a different port is an even weaker obscurity layer, but still, it still adds some security.
Re: Why Putting SSH On Another Port is a Good Idea
#108Re: Why Putting SSH On Another Port is a Good Idea
#109Re: Why Putting SSH On Another Port is a Good Idea
#110Actually, one thing I've found useful is keeping an sshd listening on port 443. I know, I know, sacrilege reusing the HTTPS port, right? The benefit of this is that it can allow you to tunnel through an HTTP proxy (e.g., like in a corporate environment). Many HTTP proxies only allow traffic through to port 80 and port 443. The benefit of ssh on port 443 is that if the proxy is handed a CONNECT verb, it will transpare…
Thats not how HTTPS works, there is no HTTP proxy for 443. You are in a corporate environment where nothing is let out on port 80, except through their HTTP proxy. However, port 443 is allowed out.
> In fact, this behaviour is what makes HTTPS remain secure when going through an HTTP proxy.
That would be a MITM against https and it doenst work that way.
If you would go over the http proxy to connect to your sshd on port 443, that would be stupid as the proxy would see your connections. Its much easier and better to just connect directly without asking the proxy.