Comment by throwa356262

2 days ago

musl only, the quick fix:

     PasswordAuthentication=no

Which is a good advice in general.

How do you break back into your digital life? You wake up in a strange place. Something happened. Everything's gone. No wallet/keys/smartphone/tablet/laptop. How would you get back into your digital life given only a laptop with access to the Internet, unless something, somewhere is passwordauthenticate=yes.

  • > You wake up in a strange place. Something happened. Everything's gone. No wallet/keys/smartphone/tablet/laptop.

    at this point the _last_ thing i care about is my email.

    where am i? am i ok? how are my friends/loved ones?

    once those are in place, it becomes clearer how to get back to "normal"

    • With nothing, how do you reach them? Your friends and loved ones are what's at the other end of the email/Internet access.

      1 reply →

  • The somewhere for password authentication is a place you have physical access. Not ssh.

    • There's been a natural disaster and your home is now inaccessible. With global warming going the way it has, that's looking more and more likely each day. Fires, hurricanes, earthquakes, war, tsunami, etc.

      1 reply →

  • PasswordAuthentication=no usually means that ssh stops directly reading /etc/passwd to authenticate, not that it stops accepting passwords completely. You'll still be able to log in with a correct password, provided KbdInteractiveAuthentication is still on, PAM is available, and the PAM policy allows for it.

  • The email at the root of my identity is tied to a country code domain in my country. There are robust legal processes for enforcing my status as the registrant and regaining control of it. Once I have access to that, I can use that to gain access to everything downstream.

    Is it fast? No, but that's a feature.

    But it does mean I get to lean on the existing processes and identity verification already part of the government bureaucracy and the courts as my backdoor.

  • A scenario where all the backups are gone and the server is somehow the only thing that survived is not a very plausible one.

    • Depends if you're backing up somewhere else online (also is that protected by 2FA?). You must not be in a place with many huge natural disasters.

      And this is assuming the server is somewhere else on the cloud.

      1 reply →

  • Remotely: An encrypted file with a seed / master passwords to all the other data, published under a public url you can remember, but not linked anywhere and not listed.

    Locally: Same, but printed out, laminated, in a safe place with other documents.

  • I walk to my pc and type ssh-keygen. If i can’t do that I’ve got bigger problems. “I must be able to recover remotely using a memorised credential” is a terrible requirement.

    • You go travelling in a foreign country and get mugged. You have no phone no wallet no keys, just something you know and the goodwill of strangers.

      2 replies →

  • Yeah your vault has password authentication. Your password manager in other words. Your vault is where you store your private ssh keys, and or the passwords for the keys.

  • I log in via console, either physical or virtual (the latter requires MFA though)

Another thing I would recommend is having your servers in a wireguard net and only allowing ssh from inside that virtual network. There is no need to publicly expose ssh.

  • Why is wireguards auth better than openssh auth?

    • Wireguard allows effectively no configuration around auth, and so it's more likely that it is configured in a secure manner.

      Openssh allows: password auth with weak passwords, PAM with potentially insecure PAM modules, gssappi, configurable ciphers, etc. Wireguard has none of those.

      Each of those auth methods adds more possible vulnerable code paths and accidentally insecure configurations. It's very reasonable to believe that wireguard auth, since it has far fewer moving parts and configuration knobs, is likely to have fewer ways it can be insecure.

I was always uncomfortable that it's on by default and surprised anyone uses it it. It's also more cumbersome compared to just using a key. I feel like using keys is the password manager analogue for SSH.

It's irrelevant. There's no reason this should be any more effective in the face of software bugs then anything else.

imo this is a good advice only if the devices that connect to the server have their home encrypted and ssh private key protected.