Frequently Asked Question

How to connect to a Virtual Machine on Windows with MobaXterm?
Last Updated 4 years ago

1. Introduction

This guide how to connect to a virtual machine from a Windows system using "MobaXterm".

MobaXterm is an SSH client for Windows that allows connections to remote servers from a Windows computer.

This guide will first cover connecting to a virtual machine with an associated "Public IP" address or via an SSH Gateway, then access to a virtual machine via "Remote Desktop" by setting up an "SSH Tunnel" will be possible.

2. Requirements

In order to proceed, you will need to know the Public or Private IP Addresses of your VM or the Public IP of the SSH Gateway. Additionally, you will need to provide your SSH key to be able to connect to a VM. Please refer to How to create SSH keys?

  •  You can find the virtual machine's "Public IP (Floating IP)" and "Private IP Addresses" in the OpenStack dashboard:


    image


  • If you don't have access to the OpenStack dashboard, please contact the technical point of contact in your organisation.

3. Setup MobaXterm and Connect

If you don't have MobaXterm installed, visit the MobaXterm website and download the Windows installer. After installation, start the program. If you are not allowed to install Software on your computer, you can run MobaXterm as portable app.

  • Start MobaXterm and click on the "Sessions" button on the top left corner:

    image
  • Next, click on "SSH" on the top left.

  • There are now 2 options on how two connect to your VM, depending whether it is accessible via a "Public IP (Floating IP)" or via an SSH gateway:
  1. If your VM is accessible via an Public IP:
    1. fill in the public IP in the "Remote host" field
    2. specify the username
    3. Click on "Advanced SSH settings", check the box next to "Use private key" and select your private key from your computer.

      image

    4. Click OK

  2. If your VM is accessible via an SSH Gateway:
    1. fill in the private IP in the "Remote host" field
    2. specify a username
    3. Click on "Network settings"
    4. Enable "Connect through SSH gateway (jump host)
    5. fill in the public IP in the "Gateway SSH server" field
    6. specify a username if it differs from the username of your VM
    7. Check the box next to "Use private key" and select your private key from your computer.

      image

    8. Click OK
  • You will now find your SSH connection listed in the left panel under "User sessions":

    image

  • Double-click on the respective entry to connect.
  • Optionally you might be asked for your SSH key passphrase. If so, enter the password and click OK to continue.
  • In some cases, especially when connecting via an SSH gateway, you might be asked for your SSH key passphrase again, if so, enter your password and press ENTER.
  • You will now see a terminal on the right hand side as well as a file browser in the left panel:

    image
  • You are now successfully connected to your VM!

4. Connect via Remote Desktop

4.1. Setup SSH tunnel

In order to be able to use remote desktop to connect to your VM, you need to establish a SSH tunnel to your virtual machine. Therefore, the default rdesktop port 3389 needs to be forwarded via the SSH gateway (or public IP) to your local computer. To do so, please proceed as followed:

  • Start MobaXterm
  • Click on "Tunneling" in the Toolbar on top

    image
  • To setup a new tunnel, click "New SSH tunnel" on the bottom left:

    image
  • Select "Local port forwarding" in the top
  • Type the Private IP Address of your virtual machine into the input field on the top right.
  • Type "3389" into the input field on the top right (3389 is the default port for remote desktop connections.
  • Type the Public IP Address of your virtual machine or the SSH gateway into the input field on the bottom right.
  • Specify your username in the field below.
  • Type "22" into the input field below.
  • Next, you need specify the port you can use to connect to the VM. Type "9999" (or any other free port) into the field.
    • If you use multiple tunnels, make sure to set different forwarded-ports (eg. 9998, 9997,...)
  • Click "Save" to save your configuration.

    image
  • Next, you need to select your private key from your local computer.
  • Click on the "Key" Symbol in the "Settings" section on the right side next to your virtual machine entry, and select your private key

    image

  • You can now start the tunnel by clicking on the play button next to your entry:

    image
  • The tunnel is now open and you can continue using the Windows "Remote Desktop Connection" client.

4.2. Remote Desktop Client

You will need a "Remote Desktop Client" installed to access your virtual machine's desktop. We suggest using the built in "Windows Remote Desktop Client".

  • Open up the Windows Start Menu
  • Type in "Remote Desktop Connection" and press "Enter"
image
  • In the field "Computer" type "localhost:9999"
  • Click "Connect"
image
  • The remote desktop will appear in a new window.
  • Insert your username and password as provided by EODC or your administrator.
image
This website relies on temporary cookies to function, but no personal data is ever stored in the cookies. For further information see our

privacy policy.

Accept

Loading ...