Generating the private key/public key/password

You can use the ssh-keygen utility to generate the private and public keys.

This is a UNIX utility that is used to generate, manage, and convert authentication keys for SSH authentication.

The ssh-keygen utility is part of the UNIX/Linux install. The system SFTP protocol is an SFTP client that can connect to a specific SFTP server by configuration.

  • On UNIX/Linux, the ssh daemon service (SFTP server) is generally installed by default.
  • On Windows, you must install third-party SFTP server software to have the system SFTP protocol to connect to the Window’s SFTP server.

Different SFTP server applications have their own configurations. Refer to the third-party software documentation for details.

A system SFTP protocol running on Windows can connect to a UNIX/Linux SFTP server. Installing SFTP server software on Windows is not required, but based solely on your particular deployment.

This is an example for generating a DSA type private/public key using Linux.

  1. Log in to a Linux box with hci user.
  2. Generate a dsa type key. For example:
    [hci@hvsheuer ~]$ ssh-keygen -t dsa
    Generating public/private dsa key pair.
    
    Specify the file in which to save the key (/home/hci/.ssh/id_dsa):     
    Specify passphrase (empty for no passphrase):     
    Specify same passphrase again:
    
    Your identification has been saved in /home/hci/.ssh/id_dsa.
    Your public key has been saved in /home/hci/.ssh/id_dsa.pub.
    
    The key fingerprint is:
    d9:ca:fd:ff:cb:f7:68:b6:cd:0c:9f:c5:4c:20:a3:b6 hci@hvsheuer

    By default the generated private/public key is saved under the ~/.ssh/ folder.

    id_dsa is the private key

    id_dsa.pub is the public key

    Note: Although the private/public key pair is generated on a Linux box, it can be also used with other platforms. For example:
    [hci@hvsheuer ~]$ ls -al ~/.ssh
    total 32
    drwx------ 2 hci staff 4096 Mar 16 12:33 .
    drwxrwxr-x 18 hci staff 4096 Mar 16 12:32 ..
    -rw------- 1 hci staff 736 Mar 16 12:33 id_dsa
    -rw-r--r-- 1 hci staff 602 Mar 16 12:33 id_dsa.pub