Generating Secure Shell (SSH) Keys
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, COARE implements SSH protocol to ensure secure connection and easier login to COARE. To comply with this best practice and to ensure the security of COARE’s network, the COARE users are required to generate their SSH keys in using 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
- Download and install PuTTY Gen.
- Run the application.
- 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.
- Once you’ve generated the keys, save both the public and private Key by clicking Save public key and Save private key.
Command Prompt (for Windows 10 only)
- Open Command Prompt or Windows PowerShell.
- Issue the command: ssh-keygen
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
Generating SSH Keys on Mac or Linux
The following process details the process on generating SSH keys on Mac or Linux OS:
- Open Terminal.
- Issue the command: ssh-keygen
- To view your public key, run this command: cat <public_key-path>