4 ms·
The certificates expire, but not the keys. This turns the CA and all points in between into a pretty major target, while SSH private keys reside only on the use
by gunapologist99 4y ago
The certificates expire, but not the keys. This turns the CA and all points in between into a pretty major target, while SSH private keys reside only on the user's workstation, are personal to the user (reducing the scope), and are easily rotated by the user (well, more easily than CA!). Tools like userify also empowers the user to revoke their own keys globally, even from their phone, just by blanking out the authorized_keys box.
Userify also lets you force key rotation for your team and automatically removes their accounts from servers if they don't rotate quickly enough.
- cubesnooper 4y agoRotation is actually a lot easier with certificates. I just generate a new key on the client, copy the public key to the CA, and I’m done, with no need to repopulate authorized_keys on all my other machines. In another comment I went into more detail about how I keep the CA secure.
- gunapologist99 4y ago> Rotation is actually a lot easier with certificates. I just generate a new key on the client, copy the public key to the CA, and I’m done, with no need to repopulate authorized_keys on all my other machines. Or, just paste your public key into your Userify profile and the same thing happens in seconds for every server that you have authorization for. Even better, there's no dependency on having a CA up and running in order to be able to log in; since your account is a regular local Linux account (just managed centrally), you log directly into the server with no need for that server to confirm your login elsewhere. But I've been burned before when a central auth server was down and I couldn't log into my servers (through no fault of my own), so I wouldn't want to go back to the old "please wait until we check your login against a central server" model again.
- cubesnooper 4y agoI’m glad Userify works well for you. For my purposes, whipping up a couple of cronjobs involving curl and OpenSSH is more appropriate than relying on an external cloud service. > But I've been burned before when a central auth server was down and I couldn't log into my servers There is no central auth server involved here. My servers check login credentials against the CA’s public key, which is installed alongside my sshd config file. I make my certificates valid for three weeks, but regenerate them every two, so if some failure happens with creating or fetching certificates I have a week to notice and fix the problem.
- gunapologist99 4y agoFair point. that's basically what userify is, I think![0] (just really a UI on top of a script!) You can run your own server for management, and that's what we do. 0. https://github.com/userify/shim/blob/master/shim.py https://github.com/userify/shim/blob/master/shim.py