Setting Up SSH Keys on macOS with Touch ID

nmattia.com

62 points by civilchaos 7 hours ago


devjam - 14 minutes ago

You can also use a password manager like 1Password [1] to store your private keys, and use a local socket for your SSH agent to automatically unlock using TouchID.

[1] https://1password.com/developers/ssh

maratc - 5 hours ago

> No key files (like ~/.ssh/id_ed25519.pub and friends) littering the file system; and there’s no risk of mistakenly deleting them either.

Or backing them up, or copying them to your new computer. You're just one spilled coffee cup away from losing the key.

throw0101a - 10 minutes ago

Another article/discussion from ~year ago on doing the same thing, "Native Secure Enclave backed SSH keys on macOS":

* https://news.ycombinator.com/item?id=46025721

citrin_ru - an hour ago

If I knew it's relatively easy I would have saved $$ on yubikey - for personal projects security requirements are not high but it's good to have something better than a file which could be stolen by malware. Kudos to author for the how-to.

apimade - 4 hours ago

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).

QGQBGdeZREunxLe - 5 hours ago

Sounds complicated. Just install https://secretive.dev/

ggm - 7 hours ago

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)

gurjeet - 3 hours ago

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.

> PasswordStore (`pass`) + GnuPG (`gpg`) + TouchID

> https://gurjeet.singh.im/blog/passwordstore+gnupg+touchid

elmcrest - 5 hours ago

happy 1Password user since years, provides this too and you'll have you ssh keys in the 1P keychain (yes, not open source, I know - only flaw imho)

XYen0n - 3 hours ago

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.

michael-sumner - an hour ago

so the TouchID is a "Yubikey" but if you lose the Mac then you lose that hardware key?

vr46 - 5 hours ago

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.

pentakkusu - 3 hours ago

No way, I just wondered if there is a way to do this myself... Having to type in my password was getting tedious for my lazy self.

- 2 hours ago
[deleted]
deakmisra - 15 minutes ago

[flagged]

rowancroft - 3 hours ago

[flagged]

rektlessness - 5 hours ago

[dead]