Text-mode access using MobaXterm#

Prerequisite#

To access KU Leuven clusters, only an approved VSC account is needed.

To access clusters hosted at these sites, you need a public/private key pair of which the public key needs to be uploaded via the VSC account page.

Download and setup MobaXterm#

Go to the MobaXterm website and download the free version. Make sure to select the ‘Portable edition’ from the download page. Create a folder called MobaXterm in a known location in your computer and decompress the contents of the downloaded zip file inside it.

Setup a shortcut for a remote session#

  1. Double click the MobaXterm_Personal executable file inside the MobaXterm folder. The MobaXterm main window will appear on your screen. It should be similar to this one:

    mobaxterm main
  2. Click on the Session icon in the top left corner.

  3. The ‘Session settings’ configuration panel will open; click on the SSH icon in the top row and you should see a window like this:

    ssh settings window
  4. In the ‘Remote host’ field introduce the cluster remote address of your VSC cluster, which should be written in the form my-vsc-cluster.example.com. Tick the ‘Specify username’ box and introduce your VSC account username. Click the ‘Advanced SSH settings’ tab for additional configurations.

    The next few steps depends on the choice of VSC site you are trying to connect to.

    Make sure that the ‘Use private key’ option is disabled. You may additionally opt for enabling the ‘X11-Forwarding’ and the ‘Compression’ options.

    advanced SSH options for KU Leuven clusters

    With this configuration, it is strongly recommended to setup your SSH agent in MobaXterm which is described below.

    Upon successful connection attempt you will be prompted to copy/paste the firewall URL in your browser as part of the MFA login procedure:

    vsc_firewall_certificate_authentication

    Confirm by clicking ‘Yes’. Once the MFA has been completed you will be connected to a login node.

    Tick the ‘Use private key’ box and click on the file icon in that field. A file browser will be opened; locate the private SSH key file you created when requesting your VSC account. Please keep in mind that these settings have to be updated if the location of the private SSH key ever changes. Check that the ‘SSH-browser type’ is set to ‘SFTP protocol’.

    advanced ssh options

    Press the ‘OK’ button and you should be prompted for your passphrase. Enter here the passphrase you chose while creating your public/private key pair. The characters will be hidden and nothing at all will appear as you type (no circles, no symbols).

  5. You should connect to the cluster and be greeted by a screen similar to this one:

    hmem greeting

    On the left sidebar (in the ‘Sftp’ tab) there is a file browser of your home directory in the cluster. You will see by default many files whose names start with a dot (‘.’) symbol. These are hidden files of the Linux environment and you should neither delete nor move them. You can hide the hidden files by clicking on the right most button at the top of the file browser.

  6. Once you disconnect from the cluster (by typing exit or closing the terminal tab) you will find on the left sidebar (in the ‘Sessions’ tab) a shortcut to the session you just setup. From now on, when you open MobaXterm, you can just double click that shortcut and you will start a remote session on the VSC cluster that you used in previous steps.

    To create a direct shortcut on your desktop (optional), right click on the saved session name and choose ‘Create a desktop shortcut’ (see image below). An icon will appear on your Desktop that will start MobaXterm and open a session in the corresponding cluster.

    session desktop shortcut
  7. Now you can create connections to other VSC clusters by repeating these steps and changing the address of the cluster. You will have then a shortcut on the Sessions tab of the left sidebar for each of them to connect to.

Import PuTTY sessions#

If you have already configured remote sessions within PuTTY, then MobaXterm will automatically import them upon installation and they will appear on the left-side pane. To edit a session, right-click on the session and then choose ‘Edit session’. Ensure that all settings are correct under the ‘SSH’ tab and the ‘Advanced SSH settings’ sub-tab:

mobaxterm_putty_imported_sessions

If the session has been properly imported you will see that all the necessary fields are already filled in. Click ‘OK’ to close the ‘Edit session’ window.

Copying files to and from the cluster#

Once you’ve setup the shortcut for connecting to a cluster, as we noted in step 6 of the previous section, you will see on the left sidebar (in the ‘Sftp’ tab) a file browser on the cluster you are connected to.

You can simply drag and drop files from your computer to that panel and they will be copied to the cluster. You can also drag and drop files from the cluster to your computer. Alternatively, you can use the file tools located at the top of the file browser.

Remember to always press the Refresh current folder button after you copied something or created/removed a file or folder on the cluster.

Setup an SSH agent to avoid typing the passphrase at each login#

Once you’ve successfully setup the connection to your cluster, you will notice that you are prompted for the passphrase at each connection you make to a cluster. To avoid retyping it each time, you can setup an internal SSH agent in MobaXterm that will take care of unlocking the private key or using an SSH certificate for Multi-Factor Authentication when you open the application. The SSH agent will save the passphrase after you have introduced it once.

  1. Open the MobaXterm program and go to the menu ‘Settings -> Configuration’

  2. You should see the MobaXterm Configuration panel. In the ‘General’ tab choose the ‘MobaXterm passwords management’ option; a new panel will be opened; make sure that ‘Save sessions passwords’ has the options ‘Always’ and ‘Save SSH keys passphrases as well’ selected (as shown below) and click ‘OK’.

    mobaxterm save passwords option
  3. Open the ‘SSH’ tab in the same MobaXterm Configuration panel. Make sure that all the boxes below the ‘SSH agents’ section are ticked.

  4. Press the ‘+’ button in the ‘Load following keys at MobAgent startup’ field, look for your private key file and select it. At the end of the process, the panel should look like this (the location of your private SSH key may be different):

    mobaxterm ssh agent setup

    Please, keep in mind that these settings will have to be updated if the location of private key ever changes.

  5. Press OK and when prompted for restarting MobaXterm, choose to do so.

  6. Once MobaXterm restarts you will be asked for the private key passphrase at launch. This will occur only once and after you introduce it correctly it will stay saved for all following sessions. Double clicking on a shortcuts for a cluster should open the corresponding connection directly.

Troubleshooting MobaXterm connection issues#

If you have trouble accessing the infrastructure, the support staff will likely ask you to provide a log. After you have made a failed attempt to connect, you can obtain the connection log by

  1. ctrl-right-clicking in the MobaXterm terminal and selecting ‘Event Log’.

  2. In the dialog window that appears, click the ‘Copy’ button to copy the log messages. They are copied as text and can be pasted in your message to support.