π Prerequisites
An AWS EC2 instance already running over the console (AWS account)
The key pair file (.pem) you downloaded when creating the instance.
Public IP address or Public DNS of your EC2 instance.
Installed MobaXterm on your machine.
Flowchart :
π₯οΈ Steps to Connect
Step 1Β – Open MobaXterm
- Start MobaXterm.
- Go to the Session menu β choose SSH.
Step 2 – Configure SSH Session
- Remote host: Enter your EC2 instance Public IP or DNS (example: ec2-xx-xx-xx-xx.compute-1.amazonaws.com).
- Username:
- For Amazon Linux β ec2-user
- For Ubuntu β ubuntu
- For CentOS β centos
- For RHEL β ec2-user or root
- Port: Keep default 22
Step 3 – Set Authentication
- In the SSH session settings, go to the Advanced SSH settings tab.
- Check Use private key. (.Pem for Mobaxterm )
- Browse and select your .pem or .ppk file.
Step 4 – Save & Connect
- Click OK to save the session.
- Double-click the saved session to connect.
- The first time, MobaXterm will ask to accept the host key β click Yes.
- You should now be logged into your EC2 instance.