I just have created a large-instance for ubuntu-AMI on Amazon ec2. generated a key pair & ssh open in firewall. now using puttygen i got ppk file since i am using window machine. now using publuc DNS i am trying to connect to server but while fetching username and pressing enter key it says "server refused our key".

how to solve this problem.

please someone help.


  • Did you add the publickey to the authorized_keys file in /home/user/.ssh/? That will allow the server to process the keys.
    – Thomas Ward
    Jul 25, 2011 at 19:32
  • Please use the contact us link at the bottom of this page to ask for your unregistered account and your new registered account to be merged. Thanks.
    – fossfreedom
    Mar 3, 2013 at 10:09

1 Answer 1


i just have got the solution. here i have made a mistake while making ppk file from pem file using puttygen.exe, i was suppose to load the pem file & then save private key. insted of that i was importing the pem file generating a key pair and then saving private key. this was creating a problem to me.

thanks for the support.

  • how to import a .pem file? when i try to import it only allows me to import ppk file
    – Harsha M V
    Nov 9, 2013 at 6:58
  • this is almost exactly what I did, I opened a key for conversion and generated a new key instead of immediately saving it
    – iopq
    Jul 4, 2021 at 12:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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