logoalt Hacker News

traceroute66 • today at 4:17 PM • 0 replies • view on HN

> I assume and hope it's as simple as setting up one key and then automatically being able to log in with any subsequently signed key.

Yes, in the most basic implementation that's it.

Obviously RTFM, but the gist is that the CA SSH Key gets defined on the server (sshd_config) side, e.g :

    TrustedUserCAKeys /etc/ssh/user_ca.pub
    AuthorizedPrincipalsFile /etc/ssh/principals
    # AuthorizedKeysFile none  # only once you're happy everything works ;)
And then yes, you can automagically log in with whatever is signed with the key(s) in `TrustedUserCAKeys` (as long as the principal defined in the signature matches one listed in `AuthorizedPrincipalsFile` – although IIRC you can wildcard `AuthorizedPrincipalsFile` so you might not even need to worry about that if you want a super-simple setup).

Then once you're happy with the basic principles and tested it out, you can do more fancy stuff like using Yubikeys as a poor-man's HSM (hardware CA) and eventually all sorts of server-side (man sshd_config) magic.

Its great ! Welcome to the dark side. ;)