What if an SSH private key could never leave your Macโand every use required Touch ID? Nicolas Mattia shows how to create a non-extractable identity in the Macโs Secure Enclave, connect it to SSH with Appleโs
ssh-keychain.dylib, and register its public key with GitHub. The quick setup takes three commands: create the identity withsc_auth, load it into the SSH agent withssh-add, then retrieve the public key when needed. After a reboot, the agent must be reminded to use the identity again.The deeper explanation follows the authentication flow: the agent offers the public key, the server accepts it, and the Secure Enclave signs the challenge after biometric approval. The trade-off is clear: private key files disappear, but if the Mac dies, the identity does too. The post also notes that the setup relies on Apple tooling whose documentation is sparse, so the security benefits come with a little mystery under the hood.
continue reading onnmattia.com
โ ๏ธ This post links to an external website. โ ๏ธ
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.