upvote
> Whereas a public open SSH port has always seemed (and proved) dangerous, now more than ever.

Wait, did I miss something? When has opensshd proven dangerous to expose?

reply
It's impossible to detect an open wireguard port as no response is generated unless you have the correct key. SSH on the other hand is easily scanned for.
reply
This is an argument for security-through-obscurity.
reply
I would hardly consider that "dangerous."
reply
There have been a variety of issues with different SSH daemon implementations and configurations. You can also just make a dangerous mistake with your own configuration, or a cloud provider can easily have a bad default cloud-init sshd config that overrides your safe config, etc.

One good example:

regreSSHion, CVE-2024-6387, is an unauthenticated remote code execution in OpenSSH’s server (sshd) that grants full root access. It affects the default configuration and does not require user interaction. It poses a significant exploit risk. https://www.qualys.com/regresshion-cve-2024-6387

With WireGuard, using a pre-shared key, attackers are interacting with virtually no code unless they have a valid encrypted packet, and then they still need the peer key to connnect.

With an SSH server, there's a lot of code being executed by any remote attacker pre-authentication. Any exploit in this code can grant access. This is just inherently more risky.

reply
I'm weakly inclined to view wireguard as even safer than openssh, but that's not the same as saying that the latter is proven unsafe. As that link notes, that was "the first OpenSSH vulnerability in nearly two decades", and while it was bad, it doesn't appear that anyone demonstrated exploitation against a 64-bit host, and openssh's response ( https://lists.mindrot.org/pipermail/openssh-unix-announce/20... ) was to promptly separate components precisely to reduce the amount of code that an unauthenticated attacker can even possibly reach. Wireguard has less code and is deliberately harder to hold wrong, but what code it has is running in ring zero, which a person could also describe as "just inherently more risky".

Again, not wanting to act like wireguard is bad or openssh is perfect. I just think your comment is a bit far the other way.

reply
Eh, many crypto stacks are full of holes and exploits
reply
It’s been awhile, but there have been exploits. Also constant attempts.
reply
You must think I'm crazy having run many servers with public SSH ports since 1996. I remember the telnet days...
reply
Nah, it's not that risky with private keys, timely security updates , and a correct configuration. But you'd be much safer with WireGuard in front.

I've been around long enough to remember upgrading servers from telnet to ssh. Some of those servers were on the public internet with `root` / `rootroot` credentials, which wasn't all that dangerous back then either, which is very funny now.

reply