Linux – Server refused our key (AWS) – Putty

amazon ec2amazon-web-serviceslinuxputty

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?

Best Answer

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

Related Topic