Live data from Hacker News

Secretive – macOS native app to store SSH keys in the Secure Enclave

github.com

71–80 of 109 posts

Re: Secretive – macOS native app to store SSH keys in the Secure Enclave

#71
post #69

Earlier quoted context omitted.

To be clear, that would be a privacy issue (a malicious server could tell what keys you have), but wouldn't allow a malicious server to log in to anything else with your keys. You don't send the private key when you log in.

Note that GP said -A -- this means the agent gets forwarded, and processes on the malicious server can ask the agent to perform authentication operations. Touch to auth means the agent (or hardware token) asks the user to to confirm they are expecting an authentication request to come in. This allows you to forward your agent to a host and have slightly more protection against malicious processes on the host using yo…

Github shouldn't ever make any use of -A should it?

Re: Secretive – macOS native app to store SSH keys in the Secure Enclave

#72

I have been using sekey for this for a while. Its pretty nice, I mean you do need to auth quite a bit if you use git clone over ssh a lot, but it does mean you know when keys are used.

Yep, it’s so much better than just key files: keeps key material in a secure system (Secure Enclave), you know when a key is used (standard macOS security prompt), and requires a physical interaction (Touch ID) to use a key.

Re: Secretive – macOS native app to store SSH keys in the Secure Enclave

#73
I've been using a YubiKey device for SSH using yubikey-agent [0] and it's been great since it’s not possible to extract keys from hardware keys and the device is carried with me. The agent is also integrated with pinentry so it requires a pin code for the session.

[0] https://github.com/FiloSottile/yubikey-agent

Re: Secretive – macOS native app to store SSH keys in the Secure Enclave

#74
post #19
post #10

Earlier quoted context omitted.

You aren't. It is the same with Yubikeys, if you use them. You are supposed to generate a certificate per user and device they are using for authentication, which is not a big deal at least for remote login on servers, as you can set an arbitrary number of valid SSH keys.

You are supposed, yes, but it is not necessary with Yubikeys. You can still import private keys into your Yubikey. At work we are using this for group access to some appliances that annoyingly limit the number of SSH authorized keys you can teach them.

Also, there are arguments against generating RSA keys with closed-source software (don't tell me that's all pure hardware in a smartcard). For one, generating keys that are vulnerable to something exotic is very much a viable threat, and yubikeys in particular had an issue where some accidentally created very weak keys.

Sure, you need to make sure the key doesn't leak on it's way, but that's not really the issue.

Re: Secretive – macOS native app to store SSH keys in the Secure Enclave

#75

For the love of God, please stop using SSH keys. Almost every "company X is hacked" title on HN can be traced to leaked SSH credentials. Use auto-expiring certificates that are issued after a proper SSO+2FA flow: https://gravitational.com/blog/how-to-ssh-properly/

> Almost every "company X is hacked" title on HN can be traced to leaked SSH credentials.

I don’t think that’s anywhere close to true but I’d be interested if you have reason to believe it is or some examples. Or maybe it’s intentional hyperbole?

Re: Secretive – macOS native app to store SSH keys in the Secure Enclave

#76
post #71
post #69

Earlier quoted context omitted.

Note that GP said -A -- this means the agent gets forwarded, and processes on the malicious server can ask the agent to perform authentication operations. Touch to auth means the agent (or hardware token) asks the user to to confirm they are expecting an authentication request to come in. This allows you to forward your agent to a host and have slightly more protection against malicious processes on the host using yo…

Github shouldn't ever make any use of -A should it?

Nope. But if you -A to a malicious server it could use your key to push to github.

Re: Secretive – macOS native app to store SSH keys in the Secure Enclave

#77
post #48

Earlier quoted context omitted.

After researching this for a while, it seems there is no documented, native option to do this. The only option is to unlock all SSH keys all the time, which makes them less secure than the passwords for websites managed by the exact same keychain. Which, in my opinion, is weird . Do they employees at Apple use a different system altogether? Because the built-in one doesn't seem very secure. Or maybe I am using it wro…

> which makes them less secure than the passwords for websites managed by the exact same keychain That's NOT true. While giving out less information to untrusted parties is obviously better than more, the private key itself is not transmitted directly to the server. This means that connecting to an attacker's SSH server doesn't give them a copy of your private key, so they can't then connect to your SSH servers.

The scenario here is with -A (agent forwarding). This means as long as you’re connected to a server with that enabled, that server can auth as you to a bunch of other stuff by having your client do it silently.

Re: Secretive – macOS native app to store SSH keys in the Secure Enclave

#78

For the love of God, please stop using SSH keys. Almost every "company X is hacked" title on HN can be traced to leaked SSH credentials. Use auto-expiring certificates that are issued after a proper SSO+2FA flow: https://gravitational.com/blog/how-to-ssh-properly/

Most of the time, you're lucky to get people to move off of passwords

Re: Secretive – macOS native app to store SSH keys in the Secure Enclave

#79
post #75

For the love of God, please stop using SSH keys. Almost every "company X is hacked" title on HN can be traced to leaked SSH credentials. Use auto-expiring certificates that are issued after a proper SSO+2FA flow: https://gravitational.com/blog/how-to-ssh-properly/

> Almost every "company X is hacked" title on HN can be traced to leaked SSH credentials. I don’t think that’s anywhere close to true but I’d be interested if you have reason to believe it is or some examples. Or maybe it’s intentional hyperbole?

Intentional hyperbole to sling blog spam. That link is to a site the OP claims in profile.

Re: Secretive – macOS native app to store SSH keys in the Secure Enclave

#80
post #23

Earlier quoted context omitted.

You could check https://krypt.co (not affiliated)

Thanks, that reminded me of upcoming iOS 14 support for WebAuth/FIDO. Perhaps that can be extended to SSH auth.

Do you mean with Face ID? Since WebAuth/FIDO already work with iOS 13. I have been using U2F with my YubiKey (whichever one has NFC).
Post reply on HN