SSH Key Cheatsheet
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
openssl rsa -in [key path] -out [key path].new
Generate public key from private key
ssh-keygen -f [key path] -y > [key path].pub
Add Key To Remote Server
Refer here if you wish to see how to easily add this key to a remote server so that you can use it to log in.
- 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?