As with all cheatsheets, this will be added to over time.
~/.ssh/id_rsa if you are concerned with just your own computers key rather than a key file.
If you were given an unencrypted SSH key, such as from AWS, then you probably want to add a passphrase to it with the following command:
ssh-keygen -p -f my-private-key.pem
Generate public key from private key
ssh-keygen -f [key path] -y > [key path].pub
Add/Change password protection
ssh-keygen -p -f [key path]
Remove password protection
openssl rsa -in [key path] -out [key path].new
- ServerFault - Create a public SSH key from the private key?
- Unix & Linux - How can I determine if someone's SSH key contains an empty passphrase?
- Remove passphrase (password) from private RSA key
- Stack Overflow - How do I add a password to an OpenSSH private key that was generated without a password?