Skip to content

Commit

Permalink
Merge pull request #124 from cedadev/add-mobaxterm-video
Browse files Browse the repository at this point in the history
Update MobaXterm video, improve instructions
  • Loading branch information
mjpritchard authored Aug 14, 2024
2 parents a41d278 + b0097be commit 4d858b3
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 44 deletions.
Binary file removed assets/img/docs/mobaxterm/file-Ktmdc5zxnP.png
Binary file not shown.
Binary file added assets/img/docs/mobaxterm/passphrase-prompt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
98 changes: 54 additions & 44 deletions content/docs/uncategorized/mobaxterm.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
---
aliases: /article/4832-mobaxterm
date: 2023-03-23 18:19:28
description: MobaXterm (windows terminal client)
description: Using MobaXterm with JASMIN
slug: mobaxterm
title: MobaXterm (windows terminal client)
title: MobaXterm (Windows terminal client)
---

Windows users are strongly recommended to connect to JASMIN using the freely
available MobaXterm This article provides information about:

- Downloading and installing MobaXterm
- Basic usage
- Setting up MobAgent to store your private key
- Additional features
available program MobaXterm.

## Versions of MobaXterm

The instructions given below are for version 23 of MobaXterm. For other
The instructions given below are for version 24 of MobaXterm. For other
versions please check the MobaXterm documentation.

The method of configuring MobaXterm to store your private key has changed with
Expand All @@ -25,8 +19,8 @@ below.

## Downloading and installing MobaXterm

Download the free Home edition of
[MobaXterm](https://mobaxterm.mobatek.net/download-home-edition.html).
Visit the [MobaXterm website](https://mobaxterm.mobatek.net/download-home-edition.html)
to download the free Home edition.

There are 2 editions available:

Expand All @@ -38,52 +32,68 @@ 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
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:

{{<image src="img/docs/mobaxterm/file-lpgGvBbrOF.png" caption="initial mobaxterm screen">}}
{{<image src="img/docs/mobaxterm/initial-screen.png" caption="MobaXterm's initial screen">}}

You can use the "Start local terminal" button or click the "+" tab to open
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.
worth setting up MobaXterm so that your private key is held globally and
is available to any new terminal session that you open.

## Enabling MobAgent to store your private key

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.
In order to log in to a remote host (e.g. a JASMIN host) you need to present
your private key which is kept your local machine. MobaXterm provides MobAgent
which can store your key for the time you are running MobaXterm, and can then
present it for you, for any session in any tab, so you don't have to enter your
passphrase for each new tab that you open.

### Video demonstration

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_ :
{{< youtube nEQB0ztE4yY >}}

### Steps with screenshots

You need to enable MobAgent in `Settings > Configuration > SSH`:

{{<image src="img/docs/mobaxterm/file-mL5QchQaBk.png" caption="ssh configuration">}}
{{<image src="img/docs/mobaxterm/ssh-configuration.png" caption="SSH Configuration tab">}}

To do this:

- Tick "Use internal SSH agent "MobAgent"
- UN-tick "Use external Pageant"
- Click the "+" symbol to locate your private key file (e.g. id_rsa_jasmin)
- Tick `Use internal SSH agent "MobAgent"`
- **Un**-tick `Use external Pageant`
- Click the `+` symbol to locate your private key file (e.g. `id_rsa_jasmin`)
- Click OK to save the settings. MobaXterm will now need to restart.
- When you restart MobaXterm you will be prompted for the passphrase associate with your private key.
- When you restart MobaXterm you will be prompted for the passphrase associated with your private key.

{{<image src="img/docs/mobaxterm/file-Ktmdc5zxnP.png" caption="passphrase prompt">}}
{{<image src="img/docs/mobaxterm/passphrase-prompt.png" caption="Private key passphrase prompt">}}

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.
clicking on `Start local terminal` and using `ssh-add -l` to list the keys currently loaded.

When you type the following command in the MobaXterm terminal, you should see output similar to below:

{{<alert type="info">}}
IMPORTANT: The box below is an example of what your command line prompt
might look like.

The username and computer name on the left indicates which machine you are
currently on. Everything to the right of the dollar symbol '$' is the command
which you are entering into the terminal.

**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!**
You don't need to type the '$' or anything before it!

When you type the following command in the Mobaxterm terminal, you should see output similar to below:
The rest of the documentation will use this format to show whether you should
run the command on your local machine (`user@localhost`) or on JASMIN (`user@sci1`).
{{</alert>}}

{{<command user="user" host="mobaxterm">}}
ssh-add -l
Expand All @@ -102,7 +112,7 @@ in loading your key before you can connect to JASMIN.
## Logging in to JASMIN using key stored in MobAgent (recommended)

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"**
JASMIN by creating a new terminal window. Click the `Start local terminal`
button.
Next, try connecting to the login server:

Expand All @@ -117,21 +127,21 @@ ssh -A <user_id>@login2.jasmin.ac.uk
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.
Click on the `Start local terminal` button then enter the following command. The final two 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.

{{<command user="user" host="mobaxterm">}}
eval $(ssh-agent -s)
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa_jasmin
(out)Enter passphrase for ~/.ssh/id_rsa_jasmin:
(out)Identity added: ~/.ssh/id_rsa_jasmin
{{</command>}}

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/`
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).
path to that **might** be `/drives/c/Users/fred/Desktop/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:
Expand All @@ -140,7 +150,7 @@ to JASMIN:
ssh -A <user_id>@login2.jasmin.ac.uk
{{</command>}}

Again, you must replace <user_id> with your JASMIN username.
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
Expand All @@ -152,7 +162,7 @@ MobaXterm is a comprehensive application that enables many useful features
such as:

- Saved session configurations
- X-forwarding / X11 / X server ( **Not recommended on JASMIN** : see [NoMachine NX for graphical linux desktop]({{< ref "graphical-linux-desktop-access-using-nx" >}}) instead)
- X-forwarding / X11 / X server (**Not recommended on JASMIN**, see [NoMachine NX for graphical linux desktop]({{< ref "graphical-linux-desktop-access-using-nx" >}}) instead)
- SSH agent forwarding
- SFTP access (with graphical drag-n-drop)
- Split-tab mode
Expand Down

0 comments on commit 4d858b3

Please sign in to comment.