42 minutes ago · 12 min read2385 words · Tech · hide

I've been wanting to write more about SSH lockdown for a while, in one evening I took my blog server from "SSH open to the world on port 22" to "no inbound ports except 443, and only from Cloudflare", with SSH now arriving through a Cloudflare Tunnel behind Zero Trust Access.I've written about locking down SSH before in Locking Down SSH the Right Way, but this time I've taken a different route and used Zero Trust, so the service is never exposed publicly at all. I'll go through it step by step, including the bits I got wrong along the way and some of the main lessons learnt.The trigger was sshole, Özgün Kültekin's write-up of an OpenSSH bug on musl libc (github.com/oz9un/sshole). On musl-based hosts (Alpine, OpenWrt, many Docker images) without PAM, an account whose shadow entry is * accepts any password between 257 and 1,024 bytes, because musl's crypt() returns "*" on failure above 256 bytes and that matches the * meant to mean "never matches", and the fix is either OpenSSH 10.6p2…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town