# 9. Enabling SSH Access

In order to access our resources, you need to have a key generated in the format SSH-ed25519 and then added to the portal. If you already have such a key, you can skip a few next sections and go directly to the section discussing how to add the key to the portal. Otherwise, you need to generate SSH-eh25519 key. It is possible on Linux, Windows and OSX.

# Key generation on Windows

  1. Open the PowerShell console and invoke the following command:

    ssh-keygen -t ed25519
    
  2. You will be asked about the name of a file where the key should be stored and the optional password for protecting the key. Please provide these data.

    Fig 1. SSH Access - Key generation in Windows
    Fig 1. SSH Access - Key generation in Windows
  3. As a Windows user, you may want to use PuTTY with the newly generated credentials. This requires undertaking a few additional steps discussed in the section about configuring PuTTY.

# Key generation on Linux

  1. Open the terminal and invoke the following command:

    ssh-keygen -t ed25519
    
  2. You will be asked about the name of a file where the key should be stored and the optional password for protecting the key. Please provide these data.

    Fig 2. SSH Access - Key generation in Linux
    Fig 2. SSH Access - Key generation in Linux

# Key generation on OSX

  1. Open the terminal and invoke the following command:

    ssh-keygen -t ed25519
    
  2. You will be asked about the name of a file where the key should be stored and the optional password for protecting the key. Please provide these data.

    Fig 3. SSH Access - Key generation in OSX
    Fig 3. SSH Access - Key generation in OSX

# Adding Key to the Portal

  1. Go to the user's profile settings by clicking the icon in the top right corner of the portal.

    Fig 4. SSH Access - Entering User Setting
    Fig 4. SSH Access - Entering User Setting
  2. Click on the Edit profile.

    Fig 5. SSH Access - Entering User Profile
    Fig 5. SSH Access - Entering User Profile
  3. Paste the whole content of the public key file (the file with the .pub extension) into the SSH public key field in the displayed window.

    Fig 6. SSH Access - Setting Public Key
    Fig 6. SSH Access - Setting Public Key

    The pasted content should be similar to this one:

    ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAGs8on3bVoqW74W37eDJ2GBUQi8IQpPFuUQxTVSmJzc pcss-jan@PCSS-JAN
    
  4. Save the changes by clicking the Save button.

# Configuring PuTTY

  1. The ed25519 keys are not natively supported by PuTTY, but you can use the program called PuTTY Key Generator (puttygen.exe) to convert the key to the PuTTY compatible form. The program is delivered with the default PuTTY installer, but if this is not yet on your system, you can get it from here (opens new window).

  2. Run PuTTYGen program, e.g. press Win + R and then write puttygen and click enter.

  3. In the opened window, select Conversions and click Import key; then select the generated earlier private key. Once the key is selected, click Save private key to save the key as PuTTY *.ppk file.

    Fig 7. SSH Access - Converting SSH-eh25519 private key to ppk file
    Fig 7. SSH Access - Converting SSH-eh25519 private key to ppk file
  4. Now you just need to select the just generated ppk file to be used in the PuTTY program. It can be configured in the PuTTY in Connection -> SSH -> Auth -> Credentials section.

    Fig 8. SSH Access - Setting ppk file in PuTTY
    Fig 8. SSH Access - Setting ppk file in PuTTY
  5. In order to login into the HPC cluster, you should specify eagle.man.poznan.pl as the Host Name for the connection in PuTTY.