Note that using a CA cert with SSH (or putting a host cert in DNS, etc) expands the attack surface for your server from just that server to the server + the CA's servers + the CA's employees + potentially other CA's + whatever governments are able to compel the CA['s] to issue a MITM cert for your server. For big organizations security is by-definition lax (you have to trust lots of non-trustworthy employees), but th…
Poll HN: Do you use SSH certificates (not mere public-key authentication)?
81–90 of 156 posts
Re: Poll HN: Do you use SSH certificates (not mere public-key authentication)?
#82I've used user certificates personally in the past but no more. These days my SSH key is a GPG key on my Yubikey.
For (centralized) user auth at work we use Kerberos/GSSAPIAuthentication (Windows 10's ssh client finally has support for it! You don't have to go download a newer version off their Github!). Users are free to use that to drop an authorized_keys on systems themselves as desired.
Re: Poll HN: Do you use SSH certificates (not mere public-key authentication)?
#83I don't see the benefit of using certificates for personal use. In my mind, certificates only really shine when administering a fleet of servers in a large company, as it eliminates the need to update the authorized_keys file on every server someone is hired or leaves. I could be missing some less obvious use cases, but if you're just authenticating to your personal machines, it doesn't seem worth it. It's not any mo…
I think this is true if you only really have one or two computers you use ssh from regularly but if you have a few or you get new ones frequently you can get back to that experience of not having to frequently generate and distribute public keys by using a yubikey to sign local keys and then your authorized_keys only needs the cert authorization in it.
Re: Poll HN: Do you use SSH certificates (not mere public-key authentication)?
#84We looked into them once at work for our "conventional" SSH infrastructure, but immediately rammed into the wall that a certificate can sign a key, but you can't have a full PKI infrastructure like SSL where certs can sign certs that can sign keys. Without the ability to delegate, the logistics of needing to create an absolutely centralized authority to do the useful things we wanted to do within the organization rai…
Cert sigantures expired after 30 min so leaks were not a problem.
It was backed by DynamoDB and the keys were in memory so everytime the containers rebooted someone would have to manually unseal before SSH would work again.
[1] - https://www.hashicorp.com/blog/managing-ssh-access-at-scale-...
Re: Poll HN: Do you use SSH certificates (not mere public-key authentication)?
#85One GPG ID is personal, one GPG ID is work... and the twain shall not cross.
Re: Poll HN: Do you use SSH certificates (not mere public-key authentication)?
#86Re: Poll HN: Do you use SSH certificates (not mere public-key authentication)?
#87I don't see the benefit of using certificates for personal use. In my mind, certificates only really shine when administering a fleet of servers in a large company, as it eliminates the need to update the authorized_keys file on every server someone is hired or leaves. I could be missing some less obvious use cases, but if you're just authenticating to your personal machines, it doesn't seem worth it. It's not any mo…
I think this is true if you only really have one or two computers you use ssh from regularly but if you have a few or you get new ones frequently you can get back to that experience of not having to frequently generate and distribute public keys by using a yubikey to sign local keys and then your authorized_keys only needs the cert authorization in it.
Like the other reply though, I keep my private SSH key on the YubiKey, protected with both a PIN and a password. I can SSH from any computer as long as I can install gpg on it.
Re: Poll HN: Do you use SSH certificates (not mere public-key authentication)?
#88Earlier quoted context omitted.
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 author…
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. In another comment I went into more detail about how I keep the CA secure.
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.
Re: Poll HN: Do you use SSH certificates (not mere public-key authentication)?
#89I store my authorized_keys in DNS TXT records, that are DNSSEC signed, with a validating resolver on the box. I then just use "/usr/bin/hesinfo %u ssh" as my AuthorizedKeysCommand in OpenSSH. I wrote a little tool that allowed you to "#include" other DNS records etc, but "hesinfo" is generally easily installable/available so it's just easier.
What is the benefit?
1) You don't have to ssh-copy-id to new boxes, which is nice.
2) You can de-auth a key for all machines by changing the DNS record. This would depend on some propagation time but perhaps you can point the resolver at your nameserver directly which would avoid that.