5 ms·
It’s very handy. I use it often. Whenever I, or someone else, need to add my public key to a server somewhere, that’s where I get it from.
by surfsvammel 5y ago
It’s very handy. I use it often. Whenever I, or someone else, need to add my public key to a server somewhere, that’s where I get it from.
- Hendrikto 5y agoAre you guys really using one SSH key for all services? That‘s really bad practice.
- deleted 5y ago[deleted]
- throwaway894345 5y agoYou can put multiple SSH keys on GitHub.
- Hendrikto 5y agoNot what I am talking about. I am talking about using the same key pair for two different things. E.g. GitHub and GitLab
- chousuke 5y agoUsing different keys for different services is overkill most of the time. Generally you need to have one key per host that you use (or per any storage location). You can use separate keys for separate services is if you for eg. privacy reasons don't want to associate the same identity with both services, but that's a personal choice, not something that improves security.
- kenmacd 5y agoI am. My ssh key is my gpg auth key. It's stored on my yubikey requiring a touch each time I use it. I use the same gpg key for talking to anyone, so why wouldn't I do the same with my ssh key? I suppose I could try to build a workflow around host-specific keys somehow derived from my auth key… but I'd need some reason to do so.
- y4mi 5y agoWhat attack vector do you think this would mitigate? You'd need several prerequisites for that to actually increase security, i.e. not using an ssh-agent (required password for every key prompt) and encrypting them at rest Otherwise you'll leak all your keys as soon as any attack vector is utilized such as hostile host siphoning from the ssh-agent forwarding or filesystem access.
- Hendrikto 5y agoI want to be able to revoke individual keys. If I want to invalidate my key for any reason, I don‘t want to have to change it for everything.
- y4mi 5y agobut why do you want to do this. there is no security benefit from revoking individual keys unless they've been compromised - however, the likelihood of only leaking a single key is extremely unlikely. There are very few attack vectors how you can compromise a private/public key pair and they all basically boil down to local access. This is not a PreSharedKey situation like a password, where both parties effectively share a single string for authentication. The private key never leaves the authenticating machine, as you're only sending a signature over which will be validated against the public key. So, how are you going to compromise a single key that splitting them increases your security? you're either completely compromised and somebody has filesystem access or you've forwarded your SSH-Agent to a compromised host. When its the former, you'll have to have the private-key encrypted so they're unable to use them (encrypted at rest) and when its the later, you cannot have your keys added to the agent, making the forwarding redundant in the first place.
- justusthane 5y agoNo, it’s not. It’s not the same as reusing a password, because unlike a password, your private key never leaves your local machine. It doesn’t matter if one of the services that you’re using the key pair to authenticate to is compromised—your private key is still safe. In order to compromise your private key the attacker would have to gain access to your local machine, in which case all of your private keys are compromised. You should use different key pairs per client, so that if one client machine is compromised you don’t have to change keys on the rest of them.