3 ms·
> It’s common knowledge that you shouldn’t put all your eggs in the same basket, but most of the time on IRC or on reddit (or the Internet at large, really), I
by BlackLotus89 4y ago
> It’s common knowledge that you shouldn’t put all your eggs in the same basket, but most of the time on IRC or on reddit (or the Internet at large, really), I see people using one single ssh key for all uses. How would you look at someone using a single key for their car, house, safe, work place, and so on?
a bit envious tbh. I would be so annoyed if we would get a key fob for every door at work instead of one key fob that can be reprogrammed.
The comparison drawn here is bad because you would look at the person funny because "How the hell is someone able to replace every lock so that this works?"
At work we have a script that pulls all our gitlab keys and adds them to the authorized_keys section if you should have access to a server. In what scenario is leaking your identity over ssh really a problem? If I want to connect to a server normally I either own or administrate the server. Next use case is a leaked private key.... How the hell do you leak your private key? There are 3 scenarios I can think of:
* you copy it to a host/usb drive and someone else has access to it
* a new attack is found to generate a private key to your public key
* someone gets access to your machine and steals it
1) you shouldn't do 2) leaves all your keys vulnerable 3) every key on the machine needs to be replaced
> As an added benefit now, if one of your ssh keys ever leaks, there’s only one place to remove it from ~/.ssh/authorized_keys (where the login@hostname comment is still present).
Do you do this for every machine you own?
Sounds like a real pain.
Maybe only because of my setup with passwords and keepassxc.
If you fear leaking your key maybe a fido2 device and/or password would be a better solution. Don't get me wrong I too have more than one ssh key, but this seems overly excessive. Since this solutions looks rather clean it maybe isn't, but I don't see many advantages here. But it is a nice setup nonetheless. I could reasonably easy implement something like this on top of my existing setup, but right now it seems only to add more administrative work. Especially since I really like the idea of an asymmetric key that opens my doors. The only downside for ssh keys is that you can't invalidate them in a central location.
- trebbble 4y agoYeah, I would entirely love it if I could use the same key for everything I have that takes a key. That'd be great. As it is I just don't bother with keys for, like, back doors to my house and such. They're in a drawer somewhere and never get used. I just can't enter those doors from outside, if they're locked. One key (well, I mean, I'd want copies of it) for everything would be excellent. Terrible analogy because I'd look at them like "damn, they've got it figured out!" [EDIT] Thinking further, the only way this falls apart is if I want to give someone else a key to just one thing, but that's a non-issue with ssh, so the analogy is still comically backwards. "But what if someone gets ahold of one key! Same key for everything, that's access to all your stuff!" well shit man, that's about the same as getting one of them if they're all different, in most cases—where do you think I keep my extra keys? And the couple I carry, so are likely to get in someone else's hands by accident or whatever, are the "give you the kingdom" type anyway. Get my car key, you can get in my house (garage door opener). Get any house key, you can probably get in my car, plus the rest of my keys (e.g. safe) are in there because I don't carry them around all the time. Yeah, letting someone borrow a key is the only time this might be inconvenient, and again, that's not a factor with SSH.
- ivan23178 4y agoYou know, there are master key systems that do exactly this: you can have a master key that opens everything and special keys for just one of the locks. There are even grandmaster systems with some locks opening subsets of locks. I'm personally a huge fan of a certain Finnish manufacturer but there are many others. You can't usually put one of those compatible cylinders into you car, usually, and there are other limitations, but, still, even just for doors and lockers it's a great thing to have. Also, usually, those expensive cylinders are reprogrammable in case of a compromise and there are other security features (keys being impossible to copy is the one I like most).
- deleted 4y ago[deleted]