|
|
Log in / Subscribe / Register

Using certificates for SSH authentication

Using certificates for SSH authentication

Posted Nov 9, 2022 10:04 UTC (Wed) by Karellen (subscriber, #67644)
Parent article: Using certificates for SSH authentication

I am wondering why there isn't an option to publish a hosts SSH public key under, e.g. https://<hostname>/.well-known/ssh.pub, and have SSH either check that automatically by default for new hosts, or have a command-line option to check it.

Obviously it won't cover all uses cases, but it ought to be useful for enough of them to be worth considering.

https://en.wikipedia.org/wiki/Well-known_URI


to post comments

Using certificates for SSH authentication

Posted Nov 9, 2022 18:20 UTC (Wed) by zdzichu (subscriber, #17118) [Link] (6 responses)

There's a DNS record for that https://en.wikipedia.org/wiki/SSHFP_record

Using certificates for SSH authentication

Posted Nov 9, 2022 22:26 UTC (Wed) by Karellen (subscriber, #67644) [Link] (5 responses)

SSHFP requires DNSSEC, which is not as widely deployed as HTTPS. Also, someone who is in a position to configure a server with SSH is very likely to be in a position to configure a static web page on that server to serve the SSH public key. I estimate that they are somewhat less likely to be in a position to configure DNS records for the server, on average.

And I don't see why both couldn't be an option.

Using certificates for SSH authentication

Posted Nov 10, 2022 8:33 UTC (Thu) by matthias (subscriber, #94967) [Link] (4 responses)

> Also, someone who is in a position to configure a server with SSH is very likely to be in a position to configure a static web page on that server to serve the SSH public key.

That is the problem. Someone who is able to deploy a fake ssh server is likely also in a position to configure a static web page on the same server. So now instead of needing a secure way to transfer the ssh key, you need a secure channel to transfer the public key of the https server. DNSSEC is an option, but if you configure this, you can directly use SSHFP. Or you can deploy a CA to manage the https keys. But then, why don't you directly use the CA to sign ssh keys?

And no, the browsers default of trusting every CA on the planet to sign any website on the planet is not really a secure way.

Using certificates for SSH authentication

Posted Nov 10, 2022 9:26 UTC (Thu) by tialaramex (subscriber, #21167) [Link] (3 responses)

> And no, the browsers default of trusting every CA on the planet to sign any website on the planet is not really a secure way.

Theory: The browsers just trust every CA on the planet with no oversight, my team will run our private CA very well.

Practice: m.d.s.policy does provide meaningful oversight and most browsers either tacitly or not do roughly what m.d.s.policy decided

Meanwhile, who is running your private CA? Huh, I thought it was Bob but he left in May. Maybe Sarah has Bob's old laptop? Oh, the CA is just a Perl script on old-web-test-04.example.com. No chance bad guys will find it on there right?

In principle running a CA ought to be fine, in practice it's exactly the sort of thing people are bad at, and so it will usually be done badly.

Using certificates for SSH authentication

Posted Nov 10, 2022 10:44 UTC (Thu) by zdzichu (subscriber, #17118) [Link] (1 responses)

FreeIPA, already mentioned somewhere here, contains a CA. It's easy to build replicated, HA setup, has a web UI, nicely integrates with automation (certmonger, ACME).

Using certificates for SSH authentication

Posted Nov 10, 2022 23:03 UTC (Thu) by tialaramex (subscriber, #21167) [Link]

The documentation at least for the ACME integration talks about this as if it just lets any applicant trigger issuance, which seems like exactly not what you want for a Private CA ?

Using certificates for SSH authentication

Posted Nov 11, 2022 0:36 UTC (Fri) by pabs (subscriber, #43278) [Link]

Uh, trust in browser vendor CA processes might be a little misplaced:

https://lwn.net/Articles/914267/

Using certificates for SSH authentication

Posted Nov 9, 2022 18:20 UTC (Wed) by dankamongmen (subscriber, #35141) [Link]

the SSHFP DNS record seems a superior solution for this?


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds