DEV Community

mehramit
mehramit

Posted on

"Server refused our key" error when I try to connect to my AWS EC2 instance using SSH?

If you're having trouble connecting to your AWS EC2 instance via Putty software and receiving the error message "Server refuse key", there is a solution.

Image description
Image description

  • First, make sure you have the latest version of Putty (0.78) installed.

  • Then, create a keypair file with a .pem extension.

  • Use Puttygen to load this .pem file and save the private key. Be sure not to generate a new private key.

  • Finally, load this private key into Putty under the SSH -> Auth -> Credentials -> Private key file for authentication category.

Image description

  • Now, AWS has made this process easy to generate the private keys. you can download the .ppk (private key) directly from the AWS portal while creating the key pair.

Image description
Following these steps should resolve the issue.

Top comments (0)