How to Access Your Instance Using PuTTY


🖥️ Intro: Unlocking Your AWS EC2 Instance with PuTTY
If you've just launched your first EC2 instance on AWS and are staring at that mysterious .pem
file wondering what to do next—you're not alone. Connecting to your instance is the first real step into the cloud, and PuTTY is one of the most popular tools to make it happen.
In this guide, we’ll walk you through the exact steps to convert your key, configure PuTTY, and securely access your EC2 instance—whether you're a beginner or just need a quick refresher. No fluff, no confusion—just a smooth path to your virtual server.
🚀 Launching an EC2 Instance with a Key Pair (.pem):
To connect to your EC2 instance using PuTTY, you'll first need to launch the instance with a key pair—specifically a .pem
file for secure SSH access. If you're new to EC2 or unsure how to launch an instance, don't worry! Just follow the step-by-step instructions provided in this blog post to get started.
https://cloudcompute.hashnode.dev/start-your-first-ec2-instance-with-these-simple-steps
🔐 Understanding Key Pair Types for EC2 Connection:
There are several ways to connect to an EC2 instance, but it all starts with the key pair. When launching a new instance, you'll be prompted to create or select a key pair. If you choose to create a new one, a pop-up window will appear with key pair type options.
You'll see two key pair types:
RSA – A widely supported encryption type compatible with all operating systems. Ideal for most use cases.
ED25519 – A newer, more secure algorithm, but may not be supported by all platforms or tools (e.g., PuTTY on Windows).
For maximum compatibility—especially if you're using PuTTY—it's recommended to go with RSA.
🔑 Understanding Private Key File Formats: .pem
vs .ppk
When launching an EC2 instance, you'll be prompted to create a key pair. The private key file you download will typically be in .pem
format by default. Here's what the formats mean:
→ .pem
(Privacy Enhanced Mail) – This is the default format used by OpenSSH. It's compatible with most terminal applications like MobaXterm, VS Code, Git Bash, macOS Terminal, and Windows Command Prompt.
→ .ppk
(PuTTY Private Key) – This format is specific to PuTTY and required if you're using PuTTY to connect.
🧭 Which Format Should You Choose?
→ If you're using PuTTY → choose or convert to .ppk
→ If you're using MobaXterm, Terminal, VS Code, Git Bash, or Command Prompt → stick with .pem
💡 Best Practice: Choose .pem
→ Even in real-world scenarios, servers typically use .pem
files. This format is more versatile and compatible with third-party tools like Jenkins, which often require .pem
for SSH-based integrations.
🔄 Can You Use .pem
with PuTTY?
Not directly. PuTTY doesn’t support .pem
files out of the box. However, you can easily convert your .pem
file to .ppk
using PuTTYgen, a companion tool that comes with PuTTY.
🛠️ Workflow Summary:
1. Create EC2 instance → choose .pem
key pair
2. Convert .pem
to .ppk
using PuTTYgen (if using PuTTY)
3. Connect to EC2 using:
: Windows → PuTTY or Command Prompt
: macOS → Terminal
: Linux → Terminal or any OpenSSH-compatible tool
To get started with PuTTY, follow the steps below to install it on your Windows machine:
→ Download PuTTY: latest release (0.83)
→ Download the latest version → 64-bit x86; Install it.
PuTTY is a free program that helps you connect safely to another computer over the internet. You can use it to control remote servers, run commands, and manage files—all from your own computer.
PuTTYgen is a small tool that comes with PuTTY. It helps you create and manage special keys (called SSH key pairs) that let you connect to servers securely without using a password. When you install PuTTY, PuTTYgen gets installed automatically too. You don’t need to download it separately.
PuTTY can't use PEM files directly. So we use PuTTYgen to change the PEM file into a PPK file, which PuTTY can understand.
→ First, launch your EC2 instance and wait until it's running. After that, you'll get a PEM file downloaded to your computer. Now, use PuTTYgen to convert that PEM file into a PPK file so PuTTY can use it.
→ Open PuTTYgen and click on “Load”
→ Go to your Downloads folder, choose the PEM file (make sure “All Files” is selected), and click Open.
→ Click “OK”
→ Click on “Save private key”
→ Click “yes”
→ Enter a name for the PPK file without spaces(use underscores), then click Save and close PuTTYgen.
→ The PEM file has been converted to a PPK file successfully.
→ Next, copy the public IP address from your EC2 instance.
→ Now, open PuTTY and enter the public IP address of your EC2 instance. This is used to establish the connection.
→ In the left-hand Category panel, expand SSH, then click on Auth. Under Auth, select Credentials.
→ Click on “Browse” & select your private key file to authenticate the session.
→ Select ppk file and click “open”
→ Once the file is loaded and click on “open”.
→ click “Accept”.
→ Next, enter the login username. Type ec2-user
in lowercase, as shown below. Once done, you should see that the connection to the instance is successful!
Key Settings to Be Aware Of: To increase the font size, right-click on the white bar and click on “Change settings”.
→ Go to Windows > Appearance → Click on Change
→ Here we can change the Font, Font style, Size. Click on “OK”
→ You can also customize the text color. Go to Windows > Selection > Colours
→ Select Default Foreground > Click on Modify
→ Select any colour and click on “OK”
→Click “Apply”
→ Here, you can see that the font and color have been successfully changed.
→ Cntrl (+) : short cut to increase font size.
We can change the settings to default.
→How to Use Command Prompt to Connect to an EC2 Server: (Windows)
Launch the instance and click on Connect
Click on SSH client tab and copy the example.
Open command prompt go to Downloads (cd Downloads)> Copy the example > Yes.
This is how we use Command Prompt to Connect to an EC2 Server.
For Mac users to connect EC2 Server:
Go to Terminal → go to your folder (cd Downloads) → Copy the below command(3rd point) and run it.
→ Copy the example and run it → Yes. (We will connect to the server).
🔚 Conclusion:
Connecting to your EC2 instance using PuTTY might seem tricky at first, but once you understand the key pair formats and follow the right steps, it becomes second nature. From launching your instance with a .pem
file to converting it into a .ppk
and logging in securely—you're now equipped to manage your server with confidence.
Whether you're just starting out or setting up production environments, mastering this connection process is a foundational skill in your cloud journey.
Keep exploring, keep building—and let your terminal be your gateway to the cloud. If you have questions or thoughts, feel free to leave a comment or share this with fellow tech enthusiasts! Thanks for reading🙏
😄Happy learning!
Subscribe to my newsletter
Read articles from Chandana Reddy directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Chandana Reddy
Chandana Reddy
Hi, I'm Chandana—a curious soul navigating the world through study, reflection, and shared wisdom. My journey is rooted in self-education: exploring new ideas, skills, and perspectives that empower personal growth. I believe that learning isn’t limited to classrooms—it’s an everyday practice that transforms who we are and how we connect. Through writing, conversations, and community-building, I share insights and tools that help others learn with purpose and passion. I’m not just a student of life—I’m a contributor to its knowledge ecosystem.