Accessing MOGON from outside using Windows PowerShell
- Open Windows PowerShell. Press the -Key, type
PowerShell
and hit enter. - Check if OpenSSH is installed on your system:
ssh -V
- You should get an output similar to that shown below
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
This tutorial was created with the OpenSSH version shown above and PowerShell 7.0.2.
- Verify that the
ssh-agent
is running:
Get-Service ssh-agent
You should get an output like in the screenshot on the right.
If theshh-agent
is no runnning, start it with:
Start-Service ssh-agent
- Go to the
.ssh
directory:
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 to 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]
Upload SSH-Key to MOGON
Upload you public SSH-Key to account.uni-mainz.de/sshkey.- Add your new SSH-Key to the
ssh-agent
.
ssh-add <YourNewPrivateKey>
Be sure to specify the correct path to the SSH-Key or go to the directory of the key before executing the command.
- Verify that the
ssh-agent
utilizes the SSH-Key
ssh-add -l
- Create the following file
~\.ssh\config
with an editor and add the following lines:Host hpcgate User <username> Hostname hpcgate.zdv.uni-mainz.de Port 22 IdentityFile C:\Users\<username>\.ssh\<YourNewPrivateKey> Host login21 HostName miil01.zdv.uni-mainz.de User <username> Port 22 IdentityFile C:\Users\<username>\.ssh\<YourNewPrivateKey> ProxyCommand ssh.exe -W %h:%p -q hpcgate
The path to your
IdentitiyFile
may be different. Please make sure the path is correct before you save the file. - Start a new Session to a MOGON service node. For example, you can now simply use:
ssh login21
- Done. You should now be able to log in to the various MOGON service nodes. You can add each login node to your
~\.ssh\config
file. A list of MOGON Service Nodes can be found here.