Generating Secure Shell (SSH) Keys

Last modified by Administrator on Thu, 02/27/2020, 11:26 AM

A public-private key pair (SSH Key Pair) is generated at a user’s local workstation for a secure remote communication to a server. Both the private key and public key comprise the encrypted identity of the user. The public key is sent and registered to a server.

As part of its best practices, the COARE implements SSH protocol to ensure secure connection and easier login to the COARE. To comply with this best practice and to ensure the security of the COARE’s network, the COARE users are required to generate their SSH keys in using the COARE or accessing their servers.

Generating SSH Keys on Windows

The following section details the process on generating SSH keys on Windows OS:

For Windows

  1. Download and install PuTTY Gen.
  2. Run the application.
  3. Under the Parameters section, make sure that the type of key is set to RSA and the number of bits should be 2048 for security purposes. Then click Generate.

    Note: Move your cursor while generating keys.

    1006988204.png

  4. Once you’ve generated the keys, save both the public and private Key by clicking Save public key and Save private key.

    Note: Passphrase is optional. (For added security – two factor authentication)

    1339997307.png

Command Prompt (for Windows 10 only)

  1. Open Command Prompt or Windows PowerShell.
  2. Issue the command: ssh-keygen

    1283773157.png

  3. To view public key, navigate to C:\Users\<username>/.ssh/id_rsa.pub (see image below) or execute this command in the command prompt: more C:\Users\<username>/.ssh/id_rsa.pub

GeneratingSSHkeys-Win.png

Generating SSH Keys on Mac or Linux

The following process details the process on generating SSH keys on Mac or Linux OS:

  1. Open Terminal.
  2. Issue the command: ssh-keygen

    NOTES:

    • Default Location of your key pair.
       - Mac: /Users/username/.ssh/
       - Linux: /home/username/.ssh/
    • Passphrase is optional. (For added security – two factor authentication).

    356052979.png

  3.  To view your public key, run this command: cat <public_key-path>
Tags: