Using SSH with MobaXterm

Setting up MobaXterm (Windows)

There are two ways to connect to SSH servers in MobaXterm. You can use the existing OpenSSH configuration, in which case the connection will be established within the local terminal with the ssh command. This is the supported and recommended way.

Please make sure to set the Terminal home and root directories to a persistent folder (see the warning below), or your keys and configuration will be lost after the next reboot. Once you have set the directories, you can simply follow the regular Configuring SSH guide. To connect to the cluster, click “Start local terminal” and enter your ssh command as described in the guide or use one of the SSH aliases from the .ssh/config file.

Alternatively, if you want to use the bookmark feature, you can set up connections in the GUI as shown below.

Generating SSH Key Pairs

MobaXterm simulates a Unix home directory called /home/mobaxterm which maps to a directory on Windows.

Warning

By default, Terminal home and Terminal root (/) directories are set to a temporary directory.

Before you do anything else, go to Settings -> Configuration in the menu. Set the directories to somewhere different than .

Don’t forget this step or the contents, including your ssh-keys, are lost on the next restart of your computer.

Screenshot of MobaXterm setting persistent home directory.

Setting persistent Home and Root Directories.

After setting your directories, click “Start local terminal”. You can generate an SSH key pair the same way as for the OpenSSH client, by following the instructions on that page.

Screenshot of MobaXterm creating an ed25519 key.

Generating an ed25519 key with MobaXterm.

To find the simulated home directory again, type open /home/mobaxterm and hit the enter key. This will open Windows Explorer with the correct path. Under this directory (it should be the one you configured earlier) there should be a .ssh directory with your private and public keys.

Setting up Sessions or Shortcuts

Info

This example establishes a connection to the Emmy Phase 3 login nodes. Please replace the hostnames with the correct ones for the cluster island you intend to use.

First click on “New session” either from the main screen or menu bar.

Screenshot of MobaXterm clicking New session

Select "New session"

Screenshot of MobaXterm clicking on SSH

Select SSH from the menu bar (top left)

Note

Replace u12345 with your assigned username.

Screenshot of MobaXterm entering host and username

Enter the remote hostname and your username

Now click on Advanced SSH settings

Screenshot of MobaXterm specifying private key

Check the box to use a private key

Then click the browse button to select the location of the private key

Bookmark name

Screenshot of MobaXterm specifying bookmark name

Select the Bookmark tab

In the bookmark dialog, you can set a meaningful name for the connection

After completing all the steps, click the OK button. MobaXterm will then open the connection automatically.

Connecting

When loading saved session or on the first connection, you will be asked if you want to trust this connection. Accept the connection.

Screenshot of MobaXterm accepting the connection

Accept the connection

you can then set the checkbox to not show this message again

Screenshot of MobaXterm entering the password for the private key

Enter the password for the SSH private key

This is the password that you have set during the SSH key generation process

The connection should now be established. If you look at the interface again, you will see the new session as bookmark to the left.

Screenshot of MobaXterm with the new session

MobaXterm with the new saved session

On the left you can see your saved session. To connect to the HPC frontend, make a double click on the session name

Screenshot of successful SSH connection within MobaXterm

MobaXterm with established connection

This is how a successful connection should look like (with SCC front end as an example)

Tip

MobaXterm also supports the PuTTY private key format (.ppk) and displays saved PuTTY connections automatically. Both clients can be used in parallel.

Using a Jumphost (Optional)

Note

These steps are usually not necessary. They are only required for the legacy SCC login nodes and dedicated frontend nodes for workgroups that have their own cluster island. Check if your login node has a ProxyJump option in the examples on the main Configuring SSH page.

If in doubt, ignore this section.

Screenshot of MobaXterm specifying Jumphost

Go to Network settings

and click on the SSH gateway (jumphost) button

Screenshot of MobaXterm specifying Jumphost settings

Enter the gateway hostname and your username and select "Use SSH key"

Click the browse button next to the private key field and select the same private key as you did earlier