111
28
So we all know how to use public key/private keys using SSH, etc. But what's the best way to use/reuse them? Should I keep them in a safe place forever? I mean, I needed a pair of keys for accessing GitHub. I created a pair from scratch and used that for some time to access GitHub. Then I formatted my HDD and lost that pair. Big deal, I created a new pair and configured GitHub to use my new pair. Or is it something that I don't want to lose?
I also needed a pair of public key/private keys to access our company systems. Our admin asked me for my public key and I generated a new pair and gave it to him. Is it generally better to create a new pair for access to different systems or is it better to have one pair and reuse it to access different systems? Similarly, is it better to create two different pairs and use one to access our companies systems from home and the other one to access the systems from work, or is it better to just have one pair and use it from both places?
This is not directly an answer to your question, but it is advisable to have passphrases for each key also. Ideally, separate passphrases for each key (use a password manager). The reason is as follows: If a private key is compromised (laptop got stolen, computer got hacked into), then you have some time before the key can be brute-forced and you can replace the public key on all the machines that have it, before your attacker can. Source: https://help.ubuntu.com/community/SSH/OpenSSH/Keys#Choosing_a_good_passphrase
– Xandor Schiefer – 2014-03-02T13:52:32.753