Set up SSH-Keys for MOGON using Windows

Here we provide information on how to create SSH-Keys on Windows using various methods for accessing MOGON.

Upload SSH-Key to MOGON

Upload you public SSH-Key to
PuTTY must already be installed on your PC in order to follow these instructions.
  1. Press the -Key to open the start menu and type PuTTYgen, click on the App to open it. Now the PuTTY Key Generator window should be displayed..
  2. To create a new key pair, first select the type of the key to generate from the bottom. We recommend the RSA algorithm and 4096 bit key size.
  3. Now click on Generate and start moving the mouse within the Window, to let PuTTY collect some randomness for the Key.
    • Once the progress bar is full, the actual key generation takes place. Your public key should be appear in the windows once the compution is complete.
  4. Now you have to specify a Passphrase and add a Comment for your SSH-Key. Make sure you add the HPCGATE,HPCLOGIN string, to specify the purpose of your key.
  5. Click on the Save private key button to save your private key. You must save your private key.
  6. Now click on the Save public key button to save your public key.
  7. Right-click in the text field labeled Public key for pasting into OpenSSH authorized_keys file: and choose Select All/Alle auswählen.
  8. Right-click again in the same field and choose Copy/Kopieren.
  9. Browse to and add your new public SSH-Key. You will find further information in this Article.
MobaXterm can also be used to generate a new SSH-Key pair. There are only a few steps different from the PuTTY procedure because the GUI looks identical.
  1. Start MobaXterm and click on Tools in the menu. From there select MobaKeyGen (SSH key generator).
  2. A windows will now open whose appearance is identical to that of PuTTYgen. You can now follow the instructions for PuTTY to create an SSH-Key pair.


Make sure to select the proper algorithm (RSA), choose the correctkey size (4096 bit) and secure your SSH-Key with a Passphrase. Also add the comment HPCGATE,HPCLOGIN to your SSH-Key.
  1. Launch a new PowerShell, preferably with admin privileges.
  2. Check if OpenSSHis installed on your system
    ssh -V

    Follow this guide to install OpenSSH on Windows if not present.

  3. Start the ssh-agent if it is not running already:
    Start-Service ssh-agent
  4. Go to the .ssh directory of your user:
    cd ~\.ssh\
  5. Generate a new SSH-Key pair with the ECDSA algorithm:
    ssh-keygen -t ecdsa -b 521 -C "HPCGATE,HPCLOGIN"

    For compatibility reasons make sure to use the ECDSA algorithm. The RSA algorithm used by Windows is old compared too the RSA algorithm used on MOGON. This causes conflicts and prevents a connection from being established.

  6. Then ssh-keygen asks for a name for the key.
    Enter a file in which to save the key (/home/you/.ssh/id_rsa): [Press enter] 
  7. After that you have to specify a passphrase - Do not use an empty passphrase!
    Enter passphrase (empty for no passphrase): [Type a passphrase]
    Enter same passphrase again: [Type passphrase again] 
  8. Done. You have created an SSH-Key that will allow you to access MOGON using PowerShell. Upload you public SSH-Key to
  • start/mogon_cluster/access_from_outside_windows/creating_sshkeys_on_windows.txt
  • Last modified: 2021/04/08 17:47
  • by jrutte02