# MobaXterm
MobaXterm (opens new window) is an application that simplifies SSH connections to your lab from your local Windows machine.
Requirements
(1) A working SSH connection to both entry and home as described in the How To Connect To Your Lab guide.
(2) The Moba file with credentials and configuration will be handy to ease the installation. Contact us for a new file if you need one.
Without these it will be hard to ensure a smooth MobaXterm configuration.
# 1. How to install
TIP
Lab users from NTNU can install MobaXterm using the software center.
- Download the
Home edition (installer edition)
from mobaxterm.mobatek.net (opens new window): - Unzip the file and install the software
# 2. Configure Mobagent
2.1 Start MobaXterm and open Settings:
2.2 Choose SSH tab and make sure that option Use internal SSH agent "Mobagent"
is checked. Then click OK to save the settings.
2.3 If you are asked to confirm restart of MobaXterm click Yes
to confirm.
# 3. Generating SSH Key
In case you have not used SSH keys before and you need to generate one, on Windows you can do so in MobaXterm using Local terminal
# 3.1 Open Local terminal
Clicking on Local terminal button opens MobaXterm command line:
# 3.2 Generate SSH key in local terminal
If you opened local terminal, you should see similar window:
Check if you already have ssh keys from before by running this command:
cat "${USERPROFILE}/.ssh/id_rsa.pub"
If previous command printed error message (No such file or directory) or there was no output it means that you probably have not created your ssh key yet and you can continue with the next steps.
Before creating SSH key we make sure that your .ssh directory exists:
mkdir -p "${USERPROFILE}/.ssh"
Now we can create SSH key:
ssh-keygen -b 4096 -t rsa -f "${USERPROFILE}/.ssh/id_rsa" -q -N ""
# 3.3 Uploading new SSH key
To be able to use the key it needs to be uploaded with ssh-copy-id
.
You will be asked to type in your SSH password that you made during the lab installation.
ssh-copy-id -i "${USERPROFILE}/.ssh/id_rsa.pub" username@entry-IP
Remember to replace username
with your username, and entry-IP
with IP address of your lab that
is included in your ssh-config.txt
file (format: 10.42.X.Y
). Example: joe-tester@10.42.X.Y
.
If you get asked to save the password, refuse by clicking on No
to make sure that MobaXterm
will authenticate with SSH keys instead of passwords.
# 3.4 Add SSH key into Mobagent
Check the list of Mobagent SSH keys and make sure that SSH key (id_rsa
file) is included. If MobaXterm included the new key automatically, you can continue to the next step:
# 4. Connect
We usually ship preconfigured Moba file with credentials. If you have not opened it, you can open it now and MobaXterm will pick up your lab session.
With a little bit of luck, you should now be able to connect directly from your client computer to your home node in your lab.
Request a new Moba file
Contact us for a new Moba file with credentials and configuration if you need one.
# Troubleshooting
# Check SSH keys in session configuration
More information
- Right click on the session that you want to edit and choose option
Edit session
. - Assure
SSH
option under theSession settings
is selected. - In Advanced SSH settings make sure that private key option is checked. Then select the path to SSH key file (
id_rsa
). - Under
Network settings
, click onConnect through SSH gateway (jump host)
- Check
Use SSH key
option and select the path to SSH key file (id_rsa
). - Confirm session settings by clicking
OK
.
# Agent refused operation
More information
If you see the error message saying: Agent refused operation
you need to install Putty.
Once Putty is installed, make sure that MobaXterm is closed and started Pageant. Pageant is part of Putty installation.
Once Pageant is running, you can start MobaXterm.
# Configure custom SSH config
More information
This part might be needed if you plan to use SSH tunnel. It is not part of recommended workflow.
To setup ssh config to be used in local terminal of MobaXterm use:
cat <<-EOF > /home/mobaxterm/.ssh/config
Paste content of your ssh-config.txt here
EOF
# Configure custom session
More information
- Open MobaXterm
- Select a new session and click on the
SSH
image on theSession settings
. - In Basic SSH settings, add
10.5.5.12
asRemote host
and type your username intoSpecify username
field. Under Advanced SSH settings uncheckX11-forwarding
if not used. Select ssh (private) key file if you already have one. - Under
Network settings
, click onConnect through SSH gateway (jump host)
- Add your labs IP-address to the
Gateway SSH server
and your user name to theUser
field (the 10.42.-address from the ssh-config). Select ssh (private) key file if you already have one. Click OK to confirm SSH jump host. - In Bookmark settings, Name your lab session. Click OK to confirm Session settings.