Connecting to an EC2 instance using Putty, WinSCP and a PEM file

First install the necessary tools

From this site (, install Putty and PuttyGen.

From this site (, install WinSCP.

Convert the PEM file to a PPK file

When you created the EC2 instance, you were given a private key file (extension: .pem). This private key file is in a form called PEM – “Private Enhanced Mail”. Putty cannot work with PEM files. Putty uses a different format called PPK. You can convert the PEM to PPK file using Puttygen.

  1. Run Puttygen.
  2. From the menu option “Conversions”, select “Import key”
  3. In the dialog, locate the pem file and “Open” it.
  4. Change the comment from ‘imported-openssh-key” to a something more descriptive like “my-db-server”
  5. Optional: Enter a passphrase.
  6. Create PPK file by clicking on “Save private key”

Connect to the server using WinSCP

  1. Run WinSCP
  2. In the Login dialog, click on the “New” button
  3. Enter the “Host” name or IP address
  4. Enter “User name” (ec2-user, root etc.)
  5. Select the PPK file in box “Private key file”
  6. Click on “Save…” and give it a descritive name like “my-db-server”
  7. Close and run WinSCP again, this time select server name and click in the “Login” button

Connect to the server using Putty

  1. Configure WinSCP to invoke Putty
  2. Goto “Options->Preferences”
  3. Select “Integrations/Applications”
  4. Locate putty.exe and click on “OK”
  5. Restart WinSCP and login to the server.
  6. From the WinSCP toolbar click, on the Putty icon (usually 8th icon from the left)
  7. You should be now logged into the server using Putty.

15 thoughts on “Connecting to an EC2 instance using Putty, WinSCP and a PEM file

  1. This will definitely be very useful for me when I get a chance to start my blog. I am trying to discover more about this topic. Just wanted to say fantastic blog post! Instagram experts would like your write up. This information is awesome.


  2. Terrific art! Here is the sort of information which are allowed to be embraced over the web. Shame on bing in the meantime definitely not location this particular distribute top! Think about it over plus take a look at this site. Cheers =)


  3. These are the steps on how to make and do a baking soda
    hot sitz bath. Disconnecting this 20 or 24-pin connector will cause the green light to turn off.
    The magazine is doing an October issue called “The Body” that will feature naked athletes.


  4. We hope it was really very easy and convert MPG or MPEG on Mac is fun.
    One therefore needs to keep formatting and re-formatting the i – Pod while switching from Mac to Windows etc.
    Flash is an interactive platform that has a powerful design and animation tool along with a dynamic scripting engine, bitmap rendering, as well as advanced video and audio playback.


  5. Pingback: Deploying a Play 2 App to Amazon EC2 connected to RDS | Simon Palmer's blog

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s