Skip to main content

Generating a SSH key

  1. Generate a standard RSA key pair.
ssh-keygen -t rsa -b 4096 -C "example@bbjprojek.org"
  1. Specify your email as the comment (recommended).

You'll be prompted for the file location, and a passphrase (optional but recommended for security).

Two files are created:

~/.ssh/id_rsa → PRIVATE KEY
~/.ssh/id_rsa.pub → PUBLIC KEY

If this SSH key is for the server, keep the public key in .ssh/authorized_keys file, and move the private key to a secure place for use.

If you are gonna set up this SSH key on PuTTY, go to configuration, then go to Connection > SSH > Auth > Credentials, and select the private key previously generated on the first input field.

PuTTY config