Generating an SSH key

Generating a new SSH key on Linux / Mac

  1. Open Terminal.

  2. Paste the text below, substituting in your email address.

    $ ssh-keygen -t rsa -b 4096 -C "[email protected]"

    This creates a new ssh key, using the provided email as a label.

    > Generating public/private rsa key pair.
  3. When you're prompted to "Enter a file in which to save the key," press Enter. This accepts the default file location.

    > Enter a file in which to save the key (/home/you/.ssh/id_rsa): [Press enter]
  4. At the prompt, type a secure passphrase. Leaving it blank is fine

    > Enter passphrase (empty for no passphrase): [Type a passphrase] > Enter same passphrase again: [Type passphrase again]

 

Generating a new SSH key on Windows

  1. Download and install the PuTTY SSH Client for Windows.
  2. Navigate to Start menu -> All Programs -> PuTTY -> PuTTYgen.
  3. Click Generate to generate the key and follow the instructions
  4. Copy the returned public key.


Was this article helpful?

mood_bad Dislike 1
mood Like 2
visibility Views: 1365