Usually a public SSH key is generated at the same time as a private key.
SSH keys are always generated in pairs with one known as the private key and the other as the public key. The private key is known only to you and it should be safely guarded. By contrast, the public key can be shared freely with any SSH server to which you wish to connect.
Unlike a private SSH key, it is acceptable to lose a public key as it can be generated again from a private key at any time.
In this small note i am showing how to create a public SSH key from a private one using ssh-keygen
command-line tool.
Network magic license key generator free. Cool Tip: Remove delay during SSH login! Read more →
Use the following command to read a private SSH key from a file and print a public key:
Short explanation:
Option | Description |
---|---|
-y | Read a private OpenSSH format file and print an OpenSSH public key to stdout |
Monster hunter generations ultimate rank 2 key quests. As an example, let’s generate a public SSH key from a private key ~/.ssh/id_rsa
and save it to the file ~/.ssh/id_rsa.pub
: