Difference between revisions of "Using PuTTY with SSH Key Pair"

From CipherSpace Client Wiki
Jump to navigation Jump to search
m (Stoyan moved page PuTTY to Using PuTTY with SSH Key Pair without leaving a redirect)
 

Latest revision as of 17:19, 17 August 2017


PuTTY

PuTTY is an SSH and telnet client, developed originally by Simon Tatham for the Windows platform. PuTTY is open source software that is available with source code and is developed and supported by a group of volunteers.

Install PuTTY

  1. Go to this site and download the MSI (Windows Installer) package for your architecture (32 or 64 bit).
  2. Run the installer and accept all the default values. You will need administrator rights to install the package.

Create a SSH Key Pair

  1. Start the program "PuTTYgen" (which was installed with PuTTY previously).
    PuTTY Gen 1.png

  2. Under "Parameters", for "Type of key to generate:" select RSA and in the field "Number of bits in a generated key:" put the value '4096'
    PuTTY Gen 2.png

  3. Under "Actions", click on "Generate",
    PuTTY Gen 3.png

    then move the mouse on the blank area until the green bar is filled.
    PuTTY Gen 4.png

    You should get a similar screen:
    PuTTY Gen 5.png

  4. Add a key passphrase in the fields "Key passphrase:" and "Confirm passphrase:".
    PuTTY Gen 6.png

  5. Click on "Save private key" and give it the name "CipherSpace"
    PuTTY Gen 7.png

  6. Click on "Save public key" and give it the name "CipherSpace.pub".
    PuTTY Gen 8.png

  7. Send the public key ("CipherSpace.pub") to CipherSpace in order to be included in your environment.

Create a PuTTY session

In order to connect to a machine via PuTTY for the first time, you need to create a session.

  1. Start the program "PuTTY"
    PuTTY Conf 1.png

  2. Go to "Session" and enter the host name (or IP address) and the port of the machine you want to reach. The connection type is "SSH".
    PuTTY Conf 2.png

  3. Optional: Go to "Connection -> Data" and enter the username for the machine you want to connect with.
    PuTTY Conf 3.png

  4. Go to "Connection -> SSH -> Auth", then next to the field "Private key file for authentication:" click on the button "Browse..."
    PuTTY Conf 4.png

    and select the private key "CipherSpace.ppk".
    PuTTY Conf 5.png

  5. Go back to "Session", then under the field "Saved Sessions" enter a name (for instance "CipherSpace VM1") and click on "Save".
    PuTTY Conf 6.png

    You'll be able to load this configuration for a new session.

Connect with PuTTY

  1. Start the program "PuTTY"
    PuTTY Run 1.png

  2. Go to "Session", then under the field "Saved Sessions" select the session you've created previously and click on "Load"
    PuTTY Run 2.png

  3. Click on "Open"
    PuTTY Run 3.png

  4. If you get the error "Network error: Connection refused",
    PuTTY Run 4.png

    close the window, restart PuTTY and under "Session" check that the hostname and the port are correct.
  5. The first time you connect to a machine, you will get the following warning:
    PuTTY Run 5.png

    Click on "Yes" to avoid the warning for the next sessions.
  6. If you get the error "Disconnected: No supported authentication methods available (server sent: publickey)",
    PuTTY Run 6.png

    it means you have forgotten to add your private key under "Connection -> SSH -> Auth" (see the point 4. in this section)