Generating SSH2 Keys

Prev Next

What is an SSH Key?

SSH (Secure Shell) is a protocol that lets you connect securely to another computer (like a server) over an encrypted channel. Instead of relying only on passwords (which can be weak or reused), SSH allows the use of cryptographic keys for stronger authentication.

An SSH key pair consists of two linked files:

  • Private Key:  This is your personal digital signature, kept secret.

  • Public Key: This is like a lock that you can give to anyone, but only your private key can unlock it.

The instructions below will assist you in generating the key pair so you can keep the private key and the public key can be configured in Relay CX Builder.

How to Generate an SSH2 Key Pair:

  1. Open a Terminal or Command

    • Linux/macOS: Open Terminal

    • Windows: Open Git Bash or Powershell

  2. Enter the following command into the terminal window:

    ssh-keygen -t rsa -b 4096 -m PEM -f ~/Desktop/id_rsa
    
    • -t rsa → generates an RSA key.

    • -b 4096 → sets the key size to 4096 bits (very secure).

    • -m PEM → saves the private key in PEM format (SSH2 compatible).

    • -f ~/Desktop/id_rsa → saves the key pair (id_rsa and id_rsa.pub) directly to your Desktop.

  3. When prompted for a passphrase, you can press Enter for no passphrase, or type in a secure passphrase for extra protection.

  4. This process should have generated 2 files on your Desktop:

    • id_rsa → This is your private key (KEEP THIS SECRET!!)

    • id_rsa.pub → This is your public key that will be uploaded into CX Builder