Fuck. OpenWRT might fit that bill.
Edit: it does, kind of:
https://forum.gl-inet.com/t/sshole-exploit-does-not-impact-gl-oem-firmware/72657
The person who discovered *sshole said OpenWRT is affected, but by default, that OS uses the Dropbear package, not OpenSSH, for SSH connections (though maintainers provide instructions for installing the latter).

Most ssh ports should be accessed through a VPN anyway, not exposed directly to the internet
Are you sure the VPN server has the smaller attack surface than the SSH server?
Wireguard and apps based on it (like Tailscale) don’t respond at all unless the data is signed with the key of a configured peer (or with Tailscale, a system on your tailnet that passes the ACL). It’s literally impossible for an outsider/attacker to detect with a port scan since it just ignores unauthenticated packets.
The Wireguard codebase is also extremely small. The core Wireguard implementation (the version in the Linux kernel) is around 5,000 lines long, so an experienced developer can read through all the code if they dedicate a day or two to it, and understand how it works.
For comparison, OpenVPN is around 70,000 lines of code and OpenSSH is around 150,000 lines of code. There’s a huge number of features in SSH!
Why aren’t there more minimal implementations like tinyssh?
Because all those extra features are really useful. You can run all sorts of things over ssh, from sophisticated file transfer to remote development and tunneling
Ssh is remote code execution. Under any implementation, any authentication methods should be the absolute last line of defense after you’ve properly locked down access
Well, yeah but more features in remote code excution = more vulnerabilities. For example sftp: you could also just run ftp over vpn for the same effect. Or just cat the file over ssh. Instead, we have one big monolith.
SFTP is just FTP over SSH… Also, FTP is essentially one small step away from code execution, even on a secure network it’s better to use SFTP
SSH isn’t many things, it’s one connection type through which you can do many things. You can’t simply cat a file over without being able to handle the throughput gracefully, otherwise you’d have to design a new layer to do exactly the same thing. The same for reading files, if it can’t gracefully spit out 10k lines in a second you couldn’t handle output
And if you can do all that, why not allow VIM over the same connection? You’re already going to have to manage the terminal session, why not fully reflect a terminal?
FTP is absolutely not the answer, but a server that will conditionally serve files as well as conditionally accept uploads is far more secure. The same for everything… If you want to manage users, instead of allowing remote code execution you should use an API to perform predefined tasks
SSH isn’t meant for security or production use, it’s meant for power and flexibility. It’s generally deactivated by default for a reason, but it’s included for a reason too. It’s just really damn useful
Ok, maybe i misunderstood ssh.
There’s Dropbear SSH, which is the most common choice for a minimal SSH server and client, but even that is around 50,000 lines of code.
That is a convincing argument. I wasn’t thinking of wireguard, but it makes sense that it’s quite small and focused, being in the kernel.
I’m dealing more with OpenVPN and that can be very annoying, that had me lean in the opposite direction earlier (and lets not even speak of the Cisco crap).
OpenVPN, no. Wireguard, yes.
Alpine? The one that doesn’t use glibc? Wasn’t this why they chose a different C runtime? For security. Ooops.
I feel like alpine is more well-known for being lightweight than secure
Dude. One issue in the time of how many in glibc…
Yes, one bug invalidates the whole project. As everyone knows, no bugs in glibc were ever discovered.
“Security” and getting rid of that pesky copyleft licensing in order to make it so corporate users have to give back as little as possible.
The only time I ever exposed my SSH port to the WAN, I got about 750 connection attempts from China and 250 attemps from Russia per hour.
Did it help you find hot milfs within a mile of your location?
yeah, while reading this i was going “What maniac exposes SSH to WAN anyway…?” the whole time. I fail to see any reason or point that can be justified exposing SSH to WAN.
Any VPS provider just gives you an SSH IP and port. So that’s the default state, until you do something else, which I imagine many don’t, since key based authentication was always considered secure.
So I don’t know the reason, but that’s the standard practice with most providers, like Digital Ocean or Linode or whatever. You can call them maniacs but you shouldn’t be surprised at something so ubiquitous.
Speaking of which, what VPS provider would you recommend for private use? I just need something small and cheap for always on headscale, matrix, keyguard-app and the likes, but I have no idea where to start looking.
Literally anyone, I’m paying ~£40 a year for a fasthosts VPS, was kind of a what can I get in the next 5mins thing, rather than a deep dive in to features. I did have a VPS at one point that had some kind of Microsoft hypervisor that made me vomit in my mouth bit when I found out. Just watch out as the bottom end of the market is full of enshitification that you don’t notice at first until you want to change the rdns or some other basic thing
I used to have a synology NAS that would sleep of death itself. Synology support asked me to port forward SSH to the open internet and set no password so they could pull logs over the next few weeks.
Yes, it was legit synology support not a scammer.
No, I haven’t bought synology ever again.
What do you use now? Qnap?
Not the person you responded to, but I’ll give my unsolicited advice: I switched to Unifi NAS. QNAP has had a lot of security nightmares, and a bad habit of EOLing devices.
The best option might actually be using an old workstation and going with something like TrueNAS, but I enjoy the convenience of a purpose built box.
One big difference between Unifi NAS and something like QNAP or Synology, is that the Unifi NAS only does NAS work, it doesn’t run containers or “apps”. You need separate compute if you want to run containers.
One thing I didn’t know before buying a UniFi Nas was it does not support raid0 or jbod unfortunately
The sounds like a big one. Doesn’t affect me, but you’d think a lot of people would want one of those.
Unifi actually sounds better. I’m the same and want my NAS to be optimized by someone smarter than me. I’ve been using qnap and don’t really care for half the crap they offer. They’re not as enshittified as Synology, but they’re getting there.
I build my own stuff now. I tried qnap after synology but it just sucked in different ways.
99.999% of that is over IPv4. I leave IPv6 open to WAN for my own use and it’s not a problem.
Thanks for the intel
Yeah it’s crazy. Are they just constantly pinging every possible ip address on every possible port every second? I opened a port for 1 day and the traffic made me uncomfortable enough to rearchitecture my entire self host setup
New friends from all over the world!
Yet some people will still say with a straight face “tHeRe iS nO hYbRiD wAr!1!1”
Not in Ba Sing Se at least…
This was about 20 years ago btw. I know it’s gotten worse. But it started earlier than most think.
Yeah, BBC has a whole documentary about it. Plus the russian state department basically published it all in a propaganda manual. They don’t exactly try to hide this stuff…
And we’ve caught them doing it. Again, and again, and again. Also they are waging a literal war against Europe and treat their own population basically the same as they do their enemies.
So there’s that hard physical evidence and proof…
Yeah but thank god for the aNtI-wEsT tankies who so enthusiastically push kremlin-sponsored talking points night and day to liberate us from our… democratically-elected oppressors, or something?
/s, of course
I mean I get it, the west isn’t perfect. But compared to russia, most western countries don’t seem so bad.
And we’d be much better off by now if they would stop meddling in our elections (i.e. by funding reactionaries and running manipulative social media campaigns) and keep their filthy psyops out of our zeitgeist
Fail2ban with increasing jail time for repeat offenders usually takes care of the worst of it after a day or two
How do you know this? What tool or utility tells you this fact? I have a port exposed for a game server but realising I don’t know how many attempts are being made.
For ssh it’ll log out to the auth log at /var/log/auth.log
I was kinda new to linux so I used https://www.papertrail.com/ and hooked it up to my syslogs, and then went “oh… oh no… oh god no…” and immediately turned off SSH.

Thank you kindly, I am reasonably new to Linux myself. Ibuse it but don’t have a great understanding
Ibusing it is how you learn it.
One reason that I have my router ignore all connection attempts from Russia and China
Russia, China, India, NK should be on all block lists
Among other things, change the default ssh port to something way higher.
Surprised me too, it’s even worse if you use a cloud host for a VPS since it’ll be a more known IP
practically need to rotate logs every hour if you foolishly leave ssh open on a open network. usually a bastion with ssh listening to port 34000 or such is a good first step.
that said the conditions for this exploit are fascinating. no pam, shadow password set to *, using a alternative to glibc. The sacrifices to be more efficient feel on par with replacing a tank’s armor with paper mache and hope.
The best armor is to not get hit!
I got into it with another sys admin on shifting port numbers. “Security through obscurity is not security!” to which I responded “Obscurity cuts out most of the bots” (therefore easier to spot real threats).
Eventually we just went the secret squirrel bastion route.
Well that sucks. IIRC a lot of my docker images are alpine based, but they’d be safe due to never having their SSH ports exposed I assume.
Why would you even have an SSH server running in a Docker container (unless the purpose of the container is being a jumpbox or similar)?
Not just rootless and read-only, but distroless/chiseled too. There’s no reason to have unneeded parts of an OS in your Docker containers. It should just be one app along with any libraries it needs (or just statically compile the app)
unless the purpose of the container is being a jumpbox or similar
What’s wrong with a rootless jumpbox?
Nothing, my point was that SSH in a container is unnecessary unless it’s for the specific purpose of the container.
While I have not done it, I could see it being appealing as it’s quicker than SSHing into the parent box first for a commonly used tool. I had a direct SSH into a systemd container for a while before deciding the extra config wasn’t worth it.
Could that not be configured with a proxyjump through the host machine still, if one needed to have this?
Wait that means I have to expose a port. But I have zero exposed ports.
This post was created by the pangolin-gang.
I’ll expose my port to you.
Privileged port?
I downvoted because I laughed 🤣
Meaning router port, not firewall port? I struggle to know the difference.
Some people seem to think that by not opening a port in their router, and instead opening a reverse tunnel to a VPS which has an open port, it somehow makes them more secure
I’m not sure what a reverse tunnel or vps is so I’m good. Why wouldnt they just use tail scale.?
behold!
the average selfhost admin!
Further, OpenSSH using musl (pronounced muscle) must not use PAM (pluggable authentication modules),
which Alpine doesn’t ship by default. Maybe one or the other remote administration suite depends on it, but those are often suspectible to exploits anyway. But you don’t expose either to WAN, right?
This is why I don’t use muzzle
tldr: disable password auth in ssh.
Also name misses the point I think, it’s a musl-hole.
which you should have been doing anyway for anything exposed to the internet
i mean assholes are muscle holes.
Yeah, but they are very specific kind of muscle hole. 🙃
Yeah, any application checking passwords would be vulnerable.
Is the name of the vulnerability literally *sshole?
Yes, it’s actually a very creative name. It’s caused by the character * allowing anyone to log into an open SSH port. So it’s an amalgam of {*}{SSH}{port (hole)}.
The long story short is that if you don’t have a password set for an account, Alpine saves the user’s password hash as “*” because no password hash will ever match it. Should be safe, right? Any password will always automatically fail, because the hash algorithm cannot return “*” as a result. So the only way to log in as that user is via something besides a password.
And when musl (the underlying system that Alpine uses for SSH) gets a Null response from its password hash, it uses “*” to represent that null value. Because lots of programs throw a fit if they get a true null value. So instead of returning a null value, it just returns a *. Which shouldn’t match anything, right?
So an attacker forces the password hash to return a null value. Simple to do, because the password hash is capped at 256 characters. So just enter something with more than 256 characters. Musl takes that null value, turns it into a *, and passes that onto Alpine. Alpine takes this *, and compares it with the list of saved usernames and password hashes. And it finds that the user (who has no password set, and shouldn’t be allowed to log in with a password) has a password hash of “*”. This matches the result musl just provided, so the attacker is able to log into the system.
Ok, I’ve never shared my nudes but that was such a good explanation that I’m considering it…
Okay, I don’t understand too much, but holy shit this is so cool. Thank you very much for the explaination! <3
Thanks a lot for this.
Ahaha! Thanks for explaining <3
* ssh olé!

Well done. Well done.
Cyberpunk as fuck.
What an aSSHole!
Given this is a vuln when entering the password, just turn off password auth and use ssh keys only. It’s what you should be doing anyway.
Easier said than done.
If you have to support the sort of user that barely managed to download a copy of putty a few years ago and kept using this, then walking them through key generation and use is a nightmare.
One could fairly argue that maybe such people shouldn’t have access to a system, but it is a reality.
Of course the likelihood that a system using musl is something that class of user would be accessing is lower.
Maybe now that ssh is generally “just there” for Windows users, you can more easily work with them to generate a key, or give them a zip file to make them have a key in a standard way. But the interaction of ssh and windows file security can be… Interesting, though mostly an issue on the ash server side.
One could fairly argue that maybe such people shouldn’t have access to a system, but it is a reality.
More that, such people shouldn’t be allowed to be sysadmins, yet self-host and/or expose any ports to the internet.
Yeah, issue being if they work for your company and management insists they have a job to do and you must provide what they ask for to do their job.
Though the most recent guy to inflict that on me is at risk of pissing off a customer as he pulled that on them and they are complaining rightly that someone that can’t sort out key based ssh auth has zero business touching their sysems. So some people can give reasonable push back.
The vuln is specifically for key-based accounts:
Second, the target system account must be configured to be passwordless. Passwordless accounts are commonly used for accounts that use certificate-based authentication.
When logging into a passwordless account, the attacker can gain access by inputting more than 256 characters in the password field.
If you disable passwords in SSH, there is no password field. There is no way for you to input anything. The connection will just be refused as the only auth method is an ssh key. If there is no matching key, SSH will refuse the connection.
If you don’t do that, the daemon will fall back to a password, which might then be vulnerable. However, no sane administrator would leave password auth enabled. Usually, you use the SSH password once - to copy an SSH key on the system. Then you disable it.
But passwords need to be enabled for SSH. You must submit a faulty password of a specific kind, and the SSH server misinterprets it for passwordless accounts, which means the server must be configured to allow you to attempt a password.
“passwordless” here means that the account doesn’t have a password. What the person you’re replying to means is that password authentication should be completely disabled in the SSH config, as that’s the only way to exploit this issue.
For added security, there is a pam module for 6-digit OTP



















