How to Connect EC2 Instance Using MobaXterm: Complete Step by Step Guide
By Braincuber Team
Published on March 14, 2026
Connecting to your EC2 instance doesn't have to be complicated. MobaXterm makes it incredibly easy to establish SSH connections with your AWS EC2 instances using .pem keypair files. This comprehensive guide will walk you through every step from installation to troubleshooting.
What You'll Learn:
- Why MobaXterm is ideal for EC2 connections
- How to install and configure MobaXterm
- Finding your EC2 instance details and keypair files
- Setting up SSH sessions with .pem authentication
- Common troubleshooting steps and solutions
- Best practices for secure remote access
Why MobaXterm?
You may be wondering why we're using MobaXterm over other SSH tools. Well, for starters, it's super beginner-friendly and combines a bunch of powerful tools in one. You can use it to transfer files, run scripts, or even open multiple sessions simultaneously.
Swiss Army Knife for Remote Connections
Whether you're working with AWS, Google Cloud, or even a Raspberry Pi at home, MobaXterm can do it all. It's like having multiple tools in one application.
Beginner Friendly
Intuitive interface with clear buttons and options. No complex command-line knowledge required to get started.
Multiple Tools
File transfer, terminal access, session management, and more all in one application.
Cross-Platform
Works seamlessly with AWS, Google Cloud, Azure, and local servers. One tool for all your remote connections.
Step 1: Install MobaXterm
If you're not already familiar with MobaXterm, it's basically used for all things remote access. You can download it for free from the official website. Installation is super easy – just download, click, and install.
Download MobaXterm
Visit the official MobaXterm website and download the Home Edition (free version). Choose the installer version for easy setup.
Run Installation
Double-click the downloaded installer and follow the on-screen instructions. Accept the default settings for optimal performance.
Launch Application
Once installation is complete, launch MobaXterm from your desktop or Start menu. You'll see an intuitive interface ready for connections.
Step 2: Get Your EC2 Instance Details
Before we continue, there are two key pieces of information you'll need from your AWS EC2 instance:
Public IP Address
The unique address AWS assigns to your EC2 instance. Go to EC2 Dashboard, select your running instance, and grab the Public IPv4 Address (looks like 13.123.45.67).
Your .pem File
The private key file downloaded when creating your EC2 instance. If you didn't save it, you may need to create a new key pair since AWS only lets you download it once.
1. Log into AWS Management Console
2. Navigate to EC2 Dashboard
3. Select your running instance
4. Copy Public IPv4 Address: 13.123.45.67
5. Locate your .pem keypair file in Downloads folder
Step 3: Start New SSH Session
Time to work some magic with MobaXterm! Open the app, and you'll see an intuitive interface. Don't let all the buttons scare you, just focus on the top left where it says Session.
Click Session Button
In the top-left corner of MobaXterm, click the Session button. You'll feel powerful just pressing that button!
Select SSH Session Type
In the new window that appears, select SSH as the session type. This will open the SSH configuration panel.
Step 4: Enter SSH Session Details
It's time to fill in the details that'll connect MobaXterm to your EC2 instance. Here's what you need to know:
Remote Host: Your EC2 Public IP Address
Example: 13.123.45.67
Username: Default user for your AMI
Amazon Linux: ec2-user
Ubuntu: ubuntu
Port: 22 (default SSH port)
Username Guidelines
If you're using Amazon Linux, your default username is ec2-user. If you're on Ubuntu, it's ubuntu. Make sure to use the correct username for your instance type.
Step 5: Attach Your .pem Key Pair
MobaXterm makes it super easy to use your .pem key file for authentication (no converting to .ppk necessary, like you'd have to with other tools).
Access Advanced Settings
Head over to the Advanced SSH Settings tab in the session configuration window.
Enable Private Key
Check the "Use private key" option to enable key-based authentication.
Browse for .pem File
Click Browse and find your .pem file on your computer. Select the file and hit OK. It's like giving MobaXterm the secret key to unlock your EC2 instance.
Step 6: Connect to Your EC2 Instance
Now that you've filled in all the details, click OK to start your session. If everything's been set up correctly, you should see a terminal pop up, and MobaXterm will work its magic to connect you to your EC2 instance.
Success!
And just like that, you're in! You should see a terminal window connected to your instance, and now you can start typing commands like a pro.
Step 7: Troubleshooting Common Issues
We all know that tech doesn't always behave. Here are some common problems you might run into—and how to solve them:
| Problem | Cause | Solution |
|---|---|---|
| Connection Timed Out | Security group settings | Ensure EC2 security group allows inbound traffic on port 22 from your IP address |
| Authentication Failed | Wrong username or key | Use correct username (ec2-user for Amazon Linux, ubuntu for Ubuntu) and ensure .pem file is correct |
| Permission Denied | File permissions | Ensure .pem file has correct read permissions and isn't corrupted |
Security Group Check
Always verify your EC2 instance's security group allows SSH (port 22) inbound traffic from your current IP address.
Key File Security
Keep your .pem files secure and never share them. If you lose a key file, you'll need to create a new key pair and associate it with your instance.
Frequently Asked Questions
Do I need to convert .pem files to .ppk format?
No! MobaXterm natively supports .pem files, unlike PuTTY which requires conversion to .ppk format. This makes MobaXterm much more convenient for AWS connections.
What's the difference between Home and Professional editions?
The Home Edition is free and includes all basic SSH features. The Professional edition adds advanced features like saved sessions, scripting, and unlimited tabs for professional use.
Can I use MobaXterm for other cloud providers?
Yes! MobaXterm works with any SSH-enabled server, including Google Cloud, Azure, DigitalOcean, and even local servers. It's a universal remote access tool.
How do I transfer files using MobaXterm?
MobaXterm includes built-in file transfer capabilities. Once connected, you can use the file browser on the left side to drag and drop files between your local machine and the EC2 instance.
Ready to Master EC2 Connections?
Our cloud infrastructure experts can help you set up secure, efficient remote access to your AWS instances with proper security configurations and best practices.
