The version of OpenSSH included with macOS does not support FIDO-related features and instead uses the relevant parameters to access the macOS Keychain, so I always have to install OpenSSH from nixpkgs myself.
This means I can have secure private keys for ssh and gpg (cue the crowd saying gpg is insecure without offering good modern alternatives), which I can also back up. And I can set up multiple YubiKeys, which I do.
An additional advantage of this solution is that you can set your YubiKey to require a touch confirmation before performing an operation. This makes it much harder for runaway AI agents to wreak havoc on your servers: there is a physical limitation, which I really like.
If you use a trezor hardware wallet (and probably other hardware wallets) you can deterministically regenerate -sk keys.
I use trezors various agents for AGE, FIDO2/passkey, ssh[0].
But you still need the backup some bits of material like stubs for some FIDO keys (not secret material) that need importing into fresh trezor devices.
It's approaching the never lose a key again levels.
Of course, I won't pretend there isn't an obvious issue. What if you lose the seed words or someone gains access. What if the software becomes incompatible, or trezor devices become expensive/change etc.
This attack on ledger was particularly impressive, with LTE modules and eSIMs used to exfiltrate secret material[0].
But ledger is one I wouldn't recommend even without these issues, they've previously stockpiled customer data which leaked and lead sustained targeted attacks on their customers.
They've got some sort of method of getting the secret keys out of the secure elements - which makes you think what's the point at all? Oh so they can sell you a backup service subscription for your keys. Which were meant to never leave your device.
Which you can do pretty much anywhere already? I'm at least not aware of any major service not allowing you to register multiple SSH public keys.
With the obvious exception being, for whatever reason, AWS that only allows specifying ONE SINGLE KEYPAIR when creating new EC2 VMs. Whyyyyyyyyyyyyyy?!
Just in case it helps someone, a while ago I wrote a blog post with exact CLI invocations to set up a local-password-store protected by TouchID. If you wish, the encrypted password-store can be backed up and tracked with a Git.
Crazy that this particular feature we’ve all been waiting for hasn’t received first-party support by any DevEx company.
You know, the companies that say security is their number one priority, or companies that scream “developers, developers, developers”. How Google and Apple didn’t come up with something together eludes me, but then again, we have entire ecosystems and categories deployed in the areas they don’t service (auth, application control, etc).
If you do this, have at least one backup key (if need be on paper) or a guaranteed alternate path into the hosts you depend on this key to access. Because if the secure enclave is as good as we're told, if you lose access to ->THIS<- secure enclave, its game over for the keys.
Secure enclave protecting Keychain, the keychain is backed up. Not the contents of the enclave.
Too many failed access attempts? poof the key is gone. Could be as low as 10.
(happy to be corrected. This is what I gather from a quick read-around. I was a bit surprised the site didn't seem to discuss this)
Your backup key should also be in a secure enclave, just in a different secure enclave. Both keys should be accepted by the system.
The truly paranoid can multiple types of secure enclaves - TouchID for primary, a YubiKey for backup.
> If need be on paper
Your security is only as strong as its weakest link. Paper has a way of getting photographed, and the privacy of your key depends on your OCR software, unless you really want to painstakingly copy it in by hand, and even then, it turns into a file-based key on the filesystem, with all its attendant risks.
No, paper for cold storage has the advantage of requiring physical access. Not some virus or hacker breaking into your computer from hundreds of miles away. If you are living in the US, gun ownership provides additional security over this piece of paper at home.
As cool as this is, this does limit the functionality of your keys, because not everything can access the secure enclave in the way it wants to - and as others point out, this is a one-way street and locks your mac hardware into the flow.
I went with this system for some months but it ultimately broke my workflow. I switched to a system of my own devising, in which my local security key decrypts the SSH keys I require.
Or backing them up, or copying them to your new computer. You're just one spilled coffee cup away from losing the key.
I have been using YubiKeys for many years now, following this guide: https://github.com/drduh/YubiKey-Guide
This means I can have secure private keys for ssh and gpg (cue the crowd saying gpg is insecure without offering good modern alternatives), which I can also back up. And I can set up multiple YubiKeys, which I do.
An additional advantage of this solution is that you can set your YubiKey to require a touch confirmation before performing an operation. This makes it much harder for runaway AI agents to wreak havoc on your servers: there is a physical limitation, which I really like.
It's quite opposite of what I'd want.
If you use a trezor hardware wallet (and probably other hardware wallets) you can deterministically regenerate -sk keys.
I use trezors various agents for AGE, FIDO2/passkey, ssh[0].
But you still need the backup some bits of material like stubs for some FIDO keys (not secret material) that need importing into fresh trezor devices.
It's approaching the never lose a key again levels.
Of course, I won't pretend there isn't an obvious issue. What if you lose the seed words or someone gains access. What if the software becomes incompatible, or trezor devices become expensive/change etc.
[0] https://github.com/romanz/trezor-agent
But ledger is one I wouldn't recommend even without these issues, they've previously stockpiled customer data which leaked and lead sustained targeted attacks on their customers.
They've got some sort of method of getting the secret keys out of the secure elements - which makes you think what's the point at all? Oh so they can sell you a backup service subscription for your keys. Which were meant to never leave your device.
[0] https://www.coindesk.com/tech/2026/10/13/ledger-says-spy-chi...
With the obvious exception being, for whatever reason, AWS that only allows specifying ONE SINGLE KEYPAIR when creating new EC2 VMs. Whyyyyyyyyyyyyyy?!
> PasswordStore (`pass`) + GnuPG (`gpg`) + TouchID
> https://gurjeet.singh.im/blog/passwordstore+gnupg+touchid
You know, the companies that say security is their number one priority, or companies that scream “developers, developers, developers”. How Google and Apple didn’t come up with something together eludes me, but then again, we have entire ecosystems and categories deployed in the areas they don’t service (auth, application control, etc).
Secure enclave protecting Keychain, the keychain is backed up. Not the contents of the enclave.
Too many failed access attempts? poof the key is gone. Could be as low as 10.
(happy to be corrected. This is what I gather from a quick read-around. I was a bit surprised the site didn't seem to discuss this)
The truly paranoid can multiple types of secure enclaves - TouchID for primary, a YubiKey for backup.
> If need be on paper
Your security is only as strong as its weakest link. Paper has a way of getting photographed, and the privacy of your key depends on your OCR software, unless you really want to painstakingly copy it in by hand, and even then, it turns into a file-based key on the filesystem, with all its attendant risks.
I went with this system for some months but it ultimately broke my workflow. I switched to a system of my own devising, in which my local security key decrypts the SSH keys I require.
If it gets compromised, you need to revoke this one key only and still maintain access from, presumably, other systems of yours.