3.17 SSH over Windows AWS
In this lesson we connect to an AWS EC2 Linux instance from a Windows machine using PuTTY. Our EC2 server has a public IP and a security group authorizing SSH on port 22. SSH is the essential tool for taking control of a remote machine and running commands as if we were sitting in front of it, all over an encrypted channel. On Windows we will use the free PuTTY client to handle the connection.
Preparing PuTTY and the key
- Download and install PuTTY from the official website (64-bit version).
- Open PuTTYgen and click Load, switching the filter to All Files to find your
.pemkey. - Select the
.pemfile downloaded from AWS, then click Save private key to export it as a.ppkfile (PuTTY's own format). - Confirm saving without a passphrase if you do not want to be prompted on every connection.
Once the key is converted, open PuTTY. Copy the public IP from the EC2 console and paste it into the Host Name field, prefixed by the default user: ec2-user@<public-ip>. Save the session profile under a name like my first instance. If you try to connect now, the server replies No supported authentication methods available because the key is not yet attached to the profile.
To fix this, go to Connection > SSH > Auth, browse to your .ppk file, load it, then come back to the Session page and save again. Open the session: PuTTY connects you to the Amazon Linux 2 EC2 server as ec2-user. You can run any command — whoami confirms the identity and ping google.com verifies outbound network access. To leave, type exit or press Ctrl + D. You now have a persistent PuTTY profile to reach your EC2 instance from Windows.