I 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.
I know people do this, but I can't get my head around it. SSH is end-to-end secure even if the entire DNS hierarchy is corrupted. The DNSSEC PKI is controlled at its roots by governments, and one level of branches down by a set of companies not known for integrity and especially strong security practices. Why would you give any of these entities any influence over your authorized keys?
Poll HN: Do you use SSH certificates (not mere public-key authentication)?
91–100 of 156 posts
Re: Poll HN: Do you use SSH certificates (not mere public-key authentication)?
#92Note 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…
That's just the nature of trusting someone else to be your CA. You don't have to do that to use SSH certs.
Re: Poll HN: Do you use SSH certificates (not mere public-key authentication)?
#93Earlier quoted context omitted.
This wouldn't matter anyway because the server can just give you access regardless of the auth provided.
I know you can restrict the methods on the client (and which keys you use) but can the client determine the host actually used it?
fn authorized(peer: ClientConnection) -> bool {
return true;
}Re: Poll HN: Do you use SSH certificates (not mere public-key authentication)?
#94This is by far the most elegant solution we've determined and allows for instant revoking of user accounts.
Re: Poll HN: Do you use SSH certificates (not mere public-key authentication)?
#95I 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…
Re: Poll HN: Do you use SSH certificates (not mere public-key authentication)?
#96And we scan for things that look like keys.
Re: Poll HN: Do you use SSH certificates (not mere public-key authentication)?
#97Earlier quoted context omitted.
> On the other side, as a personal user of SSH with basically one person to worry about, the effort of setting up a certificate seems like just a waste versus the existing key-based infrastructure; I don't understand at all what attack it would prevent or what convenience it would provide for the cost of learning it. The main benefit I get from using SSH certs at home is expiration. Before, I always had a niggling fe…
How do you issue client certificates? Do you not worry that the private key needed to issue these can also leak just the same as your personal private key?
Re: Poll HN: Do you use SSH certificates (not mere public-key authentication)?
#98Earlier quoted context omitted.
I know people do this, but I can't get my head around it. SSH is end-to-end secure even if the entire DNS hierarchy is corrupted. The DNSSEC PKI is controlled at its roots by governments, and one level of branches down by a set of companies not known for integrity and especially strong security practices. Why would you give any of these entities any influence over your authorized keys?
DNSSEC is top-down securing chain, DNSCrypt bottom-up. Each has their pros and cons. Relying on your government to keep you secure can be a valuable factor, depending on your threat model.
Re: Poll HN: Do you use SSH certificates (not mere public-key authentication)?
#99For folks on AWS I highly recommend investing in SSH over SSM in combination with EC2 Instance Connect. You can generate temporary ssh keys, send it to EC2 Instance Connect, it'll be on the server for 60 seconds. Then you can use ssm start-session to connect to the server over SSM. This also allows you to disable SSH ingress, and doesn't need a bastion or VPN.
Re: Poll HN: Do you use SSH certificates (not mere public-key authentication)?
#100Earlier quoted context omitted.
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.
I hadn't thought of storing the CA key on the YubiKey. That's an interesting way to go about 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.
And it means I have to care less about what agent I'm running most of the time.