SSH to Amazon EC2 instance using PuTTY in Windows

konkani picture konkani · Apr 23, 2012 · Viewed 57.2k times · Source

I am a newbie to Amazon web services, was trying to launch an Amazon instance and SSH to it using putty from windows. These are the steps I followed:

  1. Created a key pair.

  2. Added a security group rule for SSH and HTTP.

  3. Launched and instance of EC2 using the above key pair and security group.

  4. Using PuTTYgen converted the *.pem file to *.ppk

  5. Using putty tried connecting to the public DNS of the instance and provided the *.ppk file.

I logged in using 'root' and 'ec2-user', and created the PPK file using SSH1 and SSH2, for all these attempts I get the following error in putty,

"Server refused our key"

Can you guys please help, any suggestions would be greatly appreciated.

Answer

mikeabout picture mikeabout · Jan 6, 2013

I assume that the OP figured this out or otherwise moved on, but the answer is to use ubuntu as the user (if the server is ubuntu).