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 account.uni-mainz.de/sshkey.with PuTTYgen
PuTTY must already be installed on your PC in order to follow these instructions.
- 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..
- To create a new key pair, first select the type of the key to generate from the bottom. We recommend the
RSA
algorithm and4096 bit
key size.
- 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.
- Now you have to specify a
Passphrase
and add aComment
for your SSH-Key. Make sure you add theHPCGATE,HPCLOGIN
string, to specify the purpose of your key.
- Click on the
Save private key
button to save your private key. You must save your private key. - Now click on the
Save public key
button to save your public key. - Right-click in the text field labeled Public key for pasting into OpenSSH authorized_keys file: and choose
Select All/Alle auswählen
. - Right-click again in the same field and choose
Copy/Kopieren
. - Browse to account.uni-mainz.de and add your new public SSH-Key. You will find further information in this Article.
with MobaXterm
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.
- Start
MobaXterm
and click onTools
in the menu. From there selectMobaKeyGen (SSH key generator)
. - 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.
SSH-Key
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.with PowerShell
- Launch a new
PowerShell
, preferably with admin privileges. - Check if
OpenSSH
is installed on your system
ssh -V
Follow this guide to install
OpenSSH
on Windows if not present. - Start the
ssh-agent
if it is not running already:
Start-Service ssh-agent
- Go to the
.ssh
directory of your user:
cd ~\.ssh\
- 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. TheRSA
algorithm used by Windows is old compared too theRSA
algorithm used on MOGON. This causes conflicts and prevents a connection from being established. - 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]
- 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]
- Done. You have created an SSH-Key that will allow you to access MOGON using PowerShell. Upload you public SSH-Key to account.uni-mainz.de/sshkey.