start:mogon_cluster:access_from_outside_windows:using_powershell

  1. Open Windows PowerShell. Press the -Key, type PowerShell and hit enter.
  2. Check if OpenSSH is installed on your system:
    ssh -V 
  3. 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.

  4. Verify that the ssh-agent is running:
    Get-Service ssh-agent

    You should get an output like in the screenshot on the right.

  5. Go to the .ssh directory:
    cd ~\.ssh\
  6. 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 to the RSA algorithm used on MOGON. This causes conflicts and prevents a connection from being established.

  7. 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] 
  8. 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] 
  9. Upload SSH-Key to MOGON

    Upload you public SSH-Key to account.uni-mainz.de/sshkey.
  10. 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.

  11. Verify that the ssh-agent utilizes the SSH-Key
    ssh-add -l 
  12. 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.

  13. Start a new Session to a MOGON service node. For example, you can now simply use:
    ssh login 21
  14. 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.
  • start/mogon_cluster/access_from_outside_windows/using_powershell.txt
  • Last modified: 2020/08/19 15:02
  • by pkeller2