MobaXterm is an application for Windows with an X11 server, a tabbed SSH client and several network tools for remote access. I use it to access my Raspberry Pi projects over my local network. I particularly like it because I can run multiple terminal sessions on my PC while also being able to drag-n-drop files from my Pi.
MobaXterm Home Edition is free for personal use and it is a great alternative to Putty which is perhaps more well known within the Raspberry Pi user community. The only real restriction in the free version is that you can only create pre-sets (sessions) for 12 devices.
MobaXterm Features
- Full X server and SSH support
- Remote desktop (RDP, VNC, Xdmcp)
- Remote terminal (SSH, telnet, rlogin, Mosh)
- X11-Forwarding
- Automatic SFTP browser
- Plugins support
- Portable and installer versions
- Full documentation
- Max. 12 sessions
What I particularly like about it is :
- Tabbed sessions
- Sessions can be “detached” into separate windows
- Portable application with no installation required
- Quick remote access to the Pi terminal
- Minimum of configuration required
- Some Pi applications launch from the command line as a windowed application (e.g. Leafpad)
It makes managing a collection of session windows easy and is a perfect upgrade from the basic version of Putty.
Download & Install
To download the free version visit the Official MobaXterm Download Page. They offer an installable version or a portable version. Pick which ever one you prefer. I tend to use the portable version.
The installable version is a zip file which should be extracted once downloaded. Run the installer as you would with any other Windows application.
The portable version is also a zip file which can be extracted once downloaded. The exe can be run whenever you choose.
Enable SSH
SSH is disabled by default on the Raspberry Pi if you are using Raspbian. Make sure you enable it either using “raspi-config” on the command line or the Raspberry Pi Configuration utility on the Raspbian desktop.
These methods are explained in my enable SSH on the Raspberry Pi tutorial.
Find the IP Address of Your Pi
To connect remotely to your devices you need to know what IP address they are using on your network. To do this you can either run :
ifconfig
from the command line on the Pi or use MobaXterm’s built-in network scanner.
- Run MobaXterm
- Click the “Tools” tab on the left hand edge of the window
- Click “Network Scanner”
- Ensure the “IP range” represents the IP address pattern on your network. In this example my addresses are of the form 192.168.1.*
- Press “Start Scan”.
Here are the results :
It shows three of my Pi’s and reveals their IP addresses. MobaXterm also identifies if SSH is available on each device.
Create a New Remote Access Session
To create a saved connection to a Pi you can :
- Click the “Session” icon in the top left hand corner
- Click the “SSH” icon
- Enter the “basic SSH settings” where the “Remote host” is the IP address of your Raspberry Pi and the username is “pi” :
- Under the “Bookmark settings” tab you can change the “Session name” and even give the session a nice Raspberry Pi icon :
- Under the “Advanced settings” tab check that “X11-Forwarding” is enabled :
- Click “OK” to finish and Save
For transferring large files changing the “SSH-browser type” to “SCP” might be worth trying as it is faster.
You can repeat this process to add other sessions. The free version allows you to create up to twelve.
Right-clicking on an existing session allows you to edit, delete or duplicate it.
Raspberry Pi Remote Access
Once the sessions are defined they will appear in a list on the left-hand side.
Double clicking the session should create a tab on the right hand side. It will attempt to connect to your Pi :
In this example it now asks for the password and this is the same as if you were connecting up a Pi to a monitor. It uses the “pi” username as that is the name defined in the session settings.
Type in the the password and press [Enter].
You maybe prompted to save the password in the Session Settings. This makes it quicker to connect next time but it is up to you.
You should now be connected :
The terminal on the right is now ready you to type commands just as you would on a keyboard connected to the Pi directly.
File Management
You’ll notice that the “Sftp” tab give you a directory browser. On first connection it defaults to the “/home/pi/” path. You can use the folder tree on the left to browse directories by double-clicking.
You can also browse in the terminal window using the usual Linux commands (e.g. cd).
If you tick the “Follow terminal folder” box as you navigate directories from the command line it will update the folder tree on the left hand side to match.
Files can be dragged and dropped from the folder tree to your PC or from the PC to the folder tree.
Right-clicking in this area allows items to be created or deleted.
Editing Text Files
Right clicking on files in the file browser allows you to launch them into a text editor within Windows. You can either use the default MobaXterm text editor or use “Open with” to choose your favourite.
Once the editor has launched you can edit and make saves directly to the Pi. This can make editing complex projects much easier because you can use the full power of your PC to cut-n-paste and manipulate text files in a way that might be slower to do on the Pi itself.
You also launch the Leafpad editor on your PC by typing this in the terminal window :
leafpad myfile.txt &
This opens myfile.txt in a Leafpad window on your PC. the “&” at the end launches it but doesn’t block you using the terminal window to perform other tasks.
Rebooting the Pi and Reconnecting
From the command line you can reboot the Pi using
sudo reboot
This will break the connection to MobaXterm and you will get a “Session stopped” message.
Reconnecting the session is easy as you just have to press “R”. Although give the Pi a chance to boot!
MobaXterm is a useful application to have available if you are a Windows user and want remote access to your Raspberry Pi. I like the nice clean interface, the ability to save sessions, the file browser and the simple file editing process. It tends to get used on all of my projects as it saves having to physically connect monitors and keyboards.
3 Comments
Why on earth would you use a proprietary application for this ?
The object of SSH is to make SECURE connections to remote machines, with MobaXterm you have no way whatsoever of guaranteeing your connections are not being co-opted or sniffed by the application itself and data sent to its authors or worse.
You are doing anyone just learning about remote computer access and management a horrendous disservice by suggesting the use of any SSH client application whose code is not open.
Whilst someone starting out may not be able to read and judge for themselves that the code is trustworthy, if the code is available they at least have the ability to have someone they trust make that determination.
If you want to educate others, think more carefully about good security practice.
Don’t suggest proprietary applications for any task that involves security.
While you make some valid points, security involves a chain of trust. Unless you have reviewed every line of code in your network infrastructure you are placing trust in certain providers. This includes your router, network switches, operating system and the hardware you are using. Your PC/laptop is almost certainly proprietary hardware. You are making the same call when you choose a software vendor’s product.
As for education, if I did the right thing I would never be able to blog about anything because I’d spend the first 5000 words getting the reader to compile their own operating system.
Yes you could use a different SSH client. There are hundreds of them. Are they more secure? Who knows. According to https://www.cvedetails.com/ Putty doesn’t seem to be doing so great compared to MobaXterm.
“As for education, if I did the right thing I would never be able to blog about anything ” The basic function of a teacher is to be able to show and to actually show a student “this is how it’s done”. You do an excellent job of that!