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.
- Full X server and SSH support
- Remote desktop (RDP, VNC, Xdmcp)
- Remote terminal (SSH, telnet, rlogin, Mosh)
- 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.
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 :
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.
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
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.