Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (19.1k points)

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,

  • Created a key pair.
  • Created a security group with the rule for SSH and HTTP.
  • Launched an instance of EC2 using the above key pair and security group.
  • Using puttygen converted the *.pem file to *.ppk
  • 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.

1 Answer

0 votes
by (44.4k points)

Use ubuntu as the username. AWS has changed the username from ec2-user to ubuntu long back. So this should work!

If this doesn't work make sure that:

  • your port number is 22
  • you are using your public IP address rather than the DNS. 

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

Browse Categories