GNU/Linux Generate public and private key


Example

To generate keys for SSH client:

ssh-keygen [-t rsa | rsa1 | dsa ] [-C <comment>] [-b bits]

For example:

ssh-keygen -t rsa -b 4096 - C myemail@email.com

Default location is ~/.ssh/id_rsa for private and ~/.ssh/id_rsa.pub for public key.

For more info, please visit man.openbsd.org