Reference > Additional Protocol Information > How to Create an SSH Connection Based on Public/Private Keys Pair

How to Create an SSH Connection Based on Public/Private Keys Pair

To create a Secure Shell (SSH) connection based on a public/private keys pair, perform the following steps:

  1. Open the Mindterm console (on the probe machine) and from the command line run following command:

    C:\hp\UCMDB\DataFlowProbe\bin\jre\bin\java.exe -jar C:\hp\UCMDB\DataFlowProbe\content\lib\Mindterm.jar
  2. In the Mindterm console, go to File > Create Keypair and assign the following values:

    • Key type/format: choose DSA or RSA

    • Key length:

      • If Key type/format = DSA: choose 1024

      • If Key type/format = RSA: choose one of the following: 768, 1024, 1536, 2048, 4096, 8192, 16384 or 32768

    • Identity file: assign a name (the default name is identity)

    • Password: for no password, do not enter anything

    Caution The OpenSSH .pub format option must be selected.

  3. Click Generate and move your mouse to generate public/private keys.

  4. Once the pair is generated, go to C:\Users\<username>\AppData\Roaming\MindTerm. This directory contains generated public/private keys pair. The public key has the .pub extension.
  5. Copy the contents of .pub file to the remote Linux/Unix machine you want to connect to as follows:

    1. Connect to the Linux/Unix remote machine and locate the ~/.ssh/authorized_keys file (if the file does not exist, create it).

    2. Open the file for editing as follows:

      vi ~/.ssh/authorized_keys
    3. Append the contents of the .pub file to the authorized_keys file.

    4. Add <username>@<probe IP> to the end of the contents of the .pub file. For example, if the contents of the .pub file are:

      ssh-dss AAAAB3N.....<snippet>.....r2LnQrqhncpJyL1s0id76j6wA==

      and the probe's IP is 16.59.56.255 and the username to connect with is root, you would append the following to the contents of the ~/.ssh/authorized_keys file:

      ssh-dss AAAAB3N.....<snippet>.....r2LnQrqhncpJyL1s0id76j6wA== root@16.59.56.255
    5. Save the ~/.ssh/authorized_keys file and close it.

  6. Open the UCMDB and go to Data Flow Management > Data Flow Probe Setup > Credentials > SSH Protocol.

  7. Add a new SSH protocol with the following parameters:

    • Authentication Method: publickey

    • User Name: root

    • Key File Path: C:\\Users\\<username>\\AppData\\Roaming\\MindTerm\\<identity file>, where <identity file> is the name you entered in step 2.

    • Password: if you provided a password during creation of the public/private keys pair, you must enter the same password here.