Garrett: We need better support for SSH host certificates
Garrett: We need better support for SSH host certificates
Posted Mar 27, 2023 3:58 UTC (Mon) by NYKevin (subscriber, #129325)In reply to: Garrett: We need better support for SSH host certificates by epa
Parent article: Garrett: We need better support for SSH host certificates
When you have dug a hole of this magnitude, the correct solution is to put down the shovel. No more TOFU. No more ad-hoc SSH keying (except perhaps for toy systems). HTTP transitioned to free, automated, and centralized PKI many years ago. There is no logical reason that SSH is unable to do the same, aside from technical and political inertia. If you really want to avoid using "real" CAs, then you use DANE or something like that. Regardless, TOFU should be obsolete.
Posted Mar 27, 2023 7:41 UTC (Mon)
by anselm (subscriber, #2796)
[Link]
I'd say in a corporate environment the solution is to use SSH host certificates. In that case, the only thing you need to deploy to everyone's workstations is a known_hosts file containing the public key of your (SSH) CA, which is much less of a maintenance nightmare.
Posted Mar 27, 2023 10:36 UTC (Mon)
by mb (subscriber, #50428)
[Link] (3 responses)
I don't see a problem with TOFU.
The real problem is the lack of an automated mechanism to revoke accepted keys. But that has nothing to do with TOFU.
Posted Mar 27, 2023 16:44 UTC (Mon)
by nix (subscriber, #2304)
[Link] (2 responses)
The CA ecosystem makes me shiver. My local SSH key distribution network is a very simple thing involving AuthorizedKeysCommand and curl and private keys on yubikeys and is easy to understand and 100% entirely under my control, and can be used equally easily for machines on the public DNS and machines that are not. It does not make me shiver. Frankly even putting the private keys on a local disk seems a lot less terrifying to me than relying on the snake-infested nightmare zone that is the global PKI infrastructure.
Posted Mar 27, 2023 18:35 UTC (Mon)
by NYKevin (subscriber, #129325)
[Link] (1 responses)
OTOH, TOFU is basically the equivalent of grabbing a cup of water out of a river, eyeballing it to make sure it looks vaguely clean-ish, and hoping for the best. You probably won't get sick. I mean, lots of animals drink out of that river, right?
Posted Mar 27, 2023 18:39 UTC (Mon)
by NYKevin (subscriber, #129325)
[Link]
Posted Mar 27, 2023 11:42 UTC (Mon)
by kleptog (subscriber, #1183)
[Link] (6 responses)
What I'd like to see is that I can have a private CA stored in an ansible vault, and from there generate the host keys. It turns out there is an actual community.crypto.openssh_cert ansible plugin which looks like it could do the job. The key must be in a separate file which I hope can be encrypted, the docs don't say. When googling for it, google gives me 10(!) hits. I guess this would be number 11.
Maybe someone who has made it work can write an LWN article about it.
Posted Mar 27, 2023 15:42 UTC (Mon)
by liw (subscriber, #6379)
[Link]
Posted Mar 27, 2023 16:21 UTC (Mon)
by Cyberax (✭ supporter ✭, #52523)
[Link] (4 responses)
It's actually super-easy. Much simpler than SSL for HTTPS.
LWN should write an article about it! I can also write a post about it.
Posted Mar 27, 2023 16:43 UTC (Mon)
by corbet (editor, #1)
[Link] (2 responses)
Posted Mar 27, 2023 21:04 UTC (Mon)
by psoberoi (subscriber, #45666)
[Link]
Posted Mar 28, 2023 10:40 UTC (Tue)
by kleptog (subscriber, #1183)
[Link]
I'm in a team managing 100+ machines with a tool like ansible. What's the best practice for managing the SSH CA host certificates such that (1) users don't get the warnings from SSH, (2) multiple people can do the deployments (or perhaps even automated by a buildbot), (3) secure storage of any secrets.
I have found examples for the management of *user* SSH certificates, for example [1]. Maybe it's so obvious it doesn't get written?
[1] https://engineering.fb.com/2016/09/12/security/scalable-a...
Posted Mar 29, 2023 19:00 UTC (Wed)
by michelr (subscriber, #129677)
[Link]
The host certificate is generated at first boot and updated daily, with an expiration date 5 days after certificate creation. A Salt Pillar, implemented in Python, acts as CA, with the private key of the CA stored on the Salt Master and the host public key is added in a Salt Grain.
Especially with continuously adding and removing systems in a large environment, host certificates are really beneficial: no need to update 3000 servers if we add one.
Garrett: We need better support for SSH host certificates
Garrett: We need better support for SSH host certificates
Sprinkling CA trust chains does not really solve any real world problem that TOFU doesn't also practically solve. And it's so much simpler.
Garrett: We need better support for SSH host certificates
Garrett: We need better support for SSH host certificates
Garrett: We need better support for SSH host certificates
Garrett: We need better support for SSH host certificates
I don't have Ansible generate host keys. I have more complicated setup:
Garrett: We need better support for SSH host certificates
Garrett: We need better support for SSH host certificates
You mean we should maybe write an article like this one?
Articles
Articles
Articles
Garrett: We need better support for SSH host certificates
