MobaXterm (windows terminal client)
MobaXterm (windows terminal client)
Windows users are strongly recommended to connect to JASMIN using the freely available MobaXterm This article provides information about:
The instructions given below are for version 23 of MobaXterm. For other versions please check the MobaXterm documentation.
The method of configuring MobaXterm to store your private key has changed with different versions. The recommended method, and an alternative, are shown below.
Download the free Home edition of MobaXterm.
There are 2 editions available:
Both editions should be functionally the same once installed, but your choice may depend on what level of access you have to your Windows machine.
For the “portable” edition, the contents of the downloaded zip file should be extracted to a folder (eg. on your Windows desktop) where you can double-click the executable file “MobaXterm_Personal_xx.x” (where xx.x is the version number). Note that the “CygUtils.plugin” file should remain in this folder as this is used for storing settings.
Once opened, MobaXterm presents a screen like this:
You can use the “Start local terminal” button or click the “+” tab to open multiple tabs with a different terminal session in each tab. However, it’s worth setting up MobaXterm so that your private key is held globally, so that it’s available to any new terminal session that you open.
In order to log in to a remote host (e.g. a jasmin host) you need to present your private key from where it’s stored on your local machine. MobaXterm provides MobAgent which can store your key for the time you are running MobaXterm, and can then present the key for you, for any session in any tab, so you don’t have to enter your passphrase for each new tab that you open.
The video below demonstrates this process, or you can follow the screenshots which follow:
You need to enable MobAgent in MobaXterm’s Settings / Configuration / SSH :
To do this:
Once MobaXterm has started, you can check that your SSH key has been loaded by
clicking on ‘Start local terminal’ and using ssh-add -l
to list the keys currently loaded.
IMPORTANT: in the command examples below, the dollar symbol ‘$’ at the start of the command line in these example represents the shell prompt as displayed in your terminal - it does not need to be typed!
When you type the following command in the Mobaxterm terminal, you should see output similar to below:
ssh-add -l
2048 SHA256:1WgYUGSqffxJX6bWqBZvFsutN3Psjn5mcPV37r6D7vQ
Imported-Openssh-Key (RSA)
Sometimes the last part of this output shows your email address, but it is just a comment field at the end of the key, which can be ignored. The fact that it’s returned something which looks like a key “fingerprint”, shows that your key is loaded successfully into the agent.
If you don’t see your key listed in output similar to the above, please try again: perhaps you entered the wrong passphrase? But you will need to succeed in loading your key before you can connect to JASMIN.
As shown in the video above, once you have set up MobAgent you can connect to
JASMIN by creating a new terminal window. Click the “Start local terminal”
button.
Next, try connecting to the login server:
ssh -A <user_id>@login2.jasmin.ac.uk
(replace <user_id>
with your own JASMIN username)
MobAgent provides the most convenient way of accessing JASMIN. However, if you want to login to JASMIN without setting up MobAgent you can do so as follows.
Click on the ‘Start local terminal’ button then enter the following command. The final 2 lines show the output you should see: you are prompted for your key’s passphrase, then if successful, you see confirmation that the key is loaded.
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa_jasmin
Enter passphrase for ~/.ssh/id_rsa_jasmin:
Identity added: ~/.ssh/id_rsa_jasmin
If your key is named something different, or stored at a different location
than shown above, you will need to specify its location in the ssh-add
command. Note that MobaXterm refers to windows drives as e.g. /drives/c/
(with forward slashes). So if you’ve put your key on your desktop, then the
path to that might be /drives/c/Users/fred/Desttop/id_rsa_jasmin
(if "
fred " is your local username on Windows).
You will need to do this each time you open a new terminal session. To connect to JASMIN:
ssh -A <user_id>@login2.jasmin.ac.uk
Again, you must replace <user_id> with your JASMIN username.
As you can see, the MobAgent method mentioned previously makes this a bit easier, because it persists between sessions and you navigate to the location of your private key using graphical tools instead of having to type the path.
MobaXterm is a comprehensive application that enables many useful features such as:
cd, ls, pwd, cat
scp, rsync, wget
Please see the MobaXterm documentation for details on these.