ℹ️ Information: In this section, you’ll learn how to connect to your Amazon Linux instance using SSH. We’ll cover two popular methods: using MobaXterm and using PuTTY on Windows.
Download MobaXterm from the official website
After downloading MobaXterm, extract and open it. Then, select Session
In the Session settings interface, choose SSH
Configure the SSH connection with the following details:
ec2-user
Click OK to establish the connection. When successful, you’ll see the Linux terminal:
💡 Pro Tip: MobaXterm provides an integrated SFTP browser on the left side of the window, allowing you to easily transfer files between your local machine and the EC2 instance.
ℹ️ Information: PuTTY is a popular SSH client for Windows. Since PuTTY doesn’t natively support the .pem key format used by AWS, you’ll need to convert your key using PuTTYgen.
Download the following PuTTY tools and save them to the same location as your EC2 key pair:
Convert your .pem key to PuTTY format:
Select the kp-linux.pem file you downloaded when creating your Amazon Linux instance
After successfully importing the key, click Save private key
Name the key file kp-linux.ppk and click Save
Retrieve your instance’s public IP address:
Configure PuTTY for the connection:
Configure SSH authentication:
When prompted with a security alert about the server’s host key, click Accept to continue
When prompted for a username, enter ec2-user
and press Enter
You are now successfully connected to your Amazon Linux instance
Verify your connection by testing network connectivity:
ping amazon.com -c5
🔒 Security Note: Always keep your private key files (.pem and .ppk) secure. Never share these files or store them in public repositories, as they provide direct access to your EC2 instances.