A sane SSH(1) key management example
&gt; 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?<p>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.<p>The comparison drawn here is bad because you would look at the person funny because &quot;How the hell is someone able to replace every lock so that this works?&quot;<p>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:<p><pre><code>  * you copy it to a host&#x2F;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
</code></pre>
1) you shouldn&#x27;t do 2) leaves all your keys vulnerable 3) every key on the machine needs to be replaced<p>&gt; As an added benefit now, if one of your ssh keys ever leaks, there’s only one place to remove it from ~&#x2F;.ssh&#x2F;authorized_keys (where the login@hostname comment is still present).<p>Do you do this for every machine you own?
Sounds like a real pain.
Maybe only because of my setup with passwords and keepassxc.<p>If you fear leaking your key maybe a fido2 device and&#x2F;or password would be a better solution. Don&#x27;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&#x27;t, but I don&#x27;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&#x27;t invalidate them in a central location.