2

I've just signed up to AWS and launched EC2, downloaded key (.pem) file then generated ppk file using puttykeygen. Using this ppk file I've tried to log in to the server via SSH using Putty but it's giving me Server refused our key error with pop up:

Disconnected: No support authentication methods available (server sent: publickey)

I've also used both ec2-user and root but both don't seem to work with same error.

I'm using Amazon Linux AMI so this page recommends using ec2-user which I am already using. I've also followed the instructions on that page step by step but getting the same error above.

I've also Googled around but couldn't come to the resolution. Is this a bug in Putty or am I missing something?

  • I've already tried that one and that didn't work so it's not a duplicate – Passionate Developer Sep 7 '14 at 13:05
  • double check the instance you installed & double check the format of your key file. maybe contact amazon support through their forum forums.aws.amazon.com/message.jspa?messageID=371632 – user16081-JoeT Sep 7 '14 at 16:35
  • 1
    Found out PuttyGen generates Public Key that is different from what is supplied from AWS under authorized_keys. I had to load private key then copy paste Public Key supplied in PuttyGen then add this to authorized_keys on AWS server after logging in via browser using Java. When I used the matching generated ppk file it worked instantly after that – Passionate Developer Sep 8 '14 at 10:27
  • 1
    Can you post the solution (in above comments) to the answer section below and accept it? It'll be useful to future reader because comment has less visibility than answer and this question won't floating in un-answered pool – masegaloeh Sep 9 '14 at 4:32
  • 1
    @masegaloeh I just did. Tx :) – Passionate Developer Sep 9 '14 at 21:49
3

Found out PuttyGen generates Public Key that is different from what is supplied from AWS under authorized_keys. I had to load private key then copy paste Public Key supplied in PuttyGen then add this to authorized_keys on AWS server after logging in via browser using Java. When I used the matching generated ppk file it worked instantly after that

protected by Michael Hampton Aug 18 '15 at 4:05

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.