this post was submitted on 05 Nov 2026
264 points (96.5% liked)

Selfhosted

63677 readers
627 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

are you affected?

  • is your sshd running on musl? (alpine, openwrt, buildroot, yocto)
  • is it not using pam? alpine's openssh-server doesn't by default, or maybe you set UsePAM no
  • are password logins still on? they are by default
  • is there an account with just * as its password? key-only users, ldap users, root on alpine
  • and some other account with a real password?
  • then that * account takes any password between 257 and 1024 characters

on alpine's official aws and azure images that's the default alpine user, and it has passwordless doas. so it's root

on debian, ubuntu, fedora or anything else with glibc? going through pam? dropbear? openbsd? you're fine

you are viewing a single comment's thread
view the rest of the comments
[–] danielquinn@lemmy.ca 1 points 16 hours ago

It's been years since I was experimenting, trying to set things up properly, but at the time I could swear that I'd have the following set:

PubkeyAuthentication yes
PasswordAuthentication no
UsePam yes

and attempts to SSH into the system would still result in a password prompt, even though PasswordAuthentication was set to no. After some experimentation, I found that if I set UsePam to no, you wouldn't get a password prompt, so that's what I've been doing on every SSH server I've had since like, 2000.

Tinkering with it now though, I see there's also another directive, KbdInteractiveAuthentication, which when set to no, will ensure I don't see a password prompt even when UsePam is set to yes. I can only assume that 26ish years ago there was no KbdInteractiveAuthentication, or I just didn't know about / notice it!

Well no harm done in my case anyway, as I don't generally expose SSH servers to the outside world anyway. But it's good to know that I don't have to turn off PAM to disable password logins anymore.