Protecting Your Key¶
Keeping your SSH keys safe is important for the security of the computers that you access with them. As stated before, anyone with your private key can access the computers that have authorised your public key. The best way to keep your key safe is to not share it with anyone and to only store it on computers that you trust. An additional layer of security, is to encrypt your key. However, this removes the conveniece of not entering a passphase. As mentioned, when using keys that are encrypted, you must enter the passphase to decrypt them when using SSH.
Encrypting Existing Private Key
If you already generated your SSH key pair without encryption, worry not! You don't have to generate a new pair and place your public key on all of those computers you use your key to access. It is possible to encrypt a private key that already exists, to do so use: