News for hackers. Stuff that matters.
Re:Protecting SSH Keys with macOS Secure Enclave by mjg59 on Wednesday November 11, 2026 @02:36AM (#50450718)
Do you type your passphrase every time you log into a remote machine? If not, the private key is in RAM and can be extracted by malware and stolen. If so, that's way more annoying than using touchid or some other physical proof of presence.
Re:Protecting SSH Keys with macOS Secure Enclave by elmimmo on Wednesday November 11, 2026 @03:14AM (#50450894)
I used to install ssh_locker [1] (I don’t know if it still works), and have the passphrase in a keychain separate from the default `login` that I then set in Keychain Access to autolock after a set period of time. Handy for keeping the private key for a while in RAM and then autoremoved, instead of having it there for the whole session. It worked transparently and is a feature that should come with the OS.

[1]: https://github.com/ddribin/ssh_locker

Re:Protecting SSH Keys with macOS Secure Enclave by elmimmo on Wednesday November 11, 2026 @03:34AM (#50451007)
ChatGPT says ssh_locker locked the keys with `ssh-add -x` which doesn’t necessarily remove them from RAM. Duh! It does point to suggested minimal changes to its source code to effectively accomplish that though.
Re:Protecting SSH Keys with macOS Secure Enclave by oasisaimlessly on Wednesday November 11, 2026 @12:54PM (#50456291)
Being able to extract a private key from ssh-agent's PR_SET_DUMPABLE=0 process would be a kernel bug; if you're sitting on such a vulnerability, please consider reporting it.
Re:Protecting SSH Keys with macOS Secure Enclave by mjg59 on Thursday November 12, 2026 @01:27AM (#50463740)
So the malware modifies your environment to LD_PRELOAD something into ssh-agent instead on your next login? Stuff that runs inside your own session is inherently vulnerable to malware inside that, even if ptrace protections are a speedbump.