Hacker News new | ask | show | jobs
by sidneythekidney 19 days ago
You get this exact workflow if you use a passphrase on the -sk key, and add the key to your ssh-agent.

Edit: well, maybe not exact. With -sk keys you’d have to type in a passphrase instead of a pin. But that passphrase could be a pin.

3 comments

Not exactly.

1. This method only works (securely) for non-resident keys. 2. hence requiring having pk stub copied manually to every machine 3. its passphrase is prone to brute-force

While piv based ssh keys solve those 3 problems (with one caveat, left for a careful reader :)

Can you please elaborate on why this doesn’t work securely for resident keys?

I don’t use them personally. I like to tie ssh-keys to machines, so using non-resident keys always seemed like a good fit.

Caveat?

  the Secure Enclave get stolen or lost
Huh, in that case it's possible I did this wrong the last time I tried it, or maybe something's changed.

Thanks for the tip! I'll try that this evening, I'd love to move to FIDO keys if possible.

You are not supposed to use passphrases with -sk keys.
Sure you can.

That's why OpenSSH can support 2 or more public keys per login.

Typically, 2+ public key authentication is used to secure the host and the user separately.

Adding a 3rd is your PIN.

Heck, you can even add a 4th for the host's PIN.

More on setting up OpenSSH for multiple public keys:

https://serverfault.com/questions/880051/how-to-list-all-ope...

Why not?