Unable to connect to amazon server using putty

2019-06-27 10:33发布

问题:

I am trying to connect to EC2 server using putty with the help of .pem. It is giving me an error: Disconnected: No supported authentication methods available (server sent: public key)

I have created a .ppk through puttygen. Still facing the same problem.

Can any one help me with the solution.

回答1:

This usually means that there was a problem with how the pem file was converted to a ppk file, or that the pem file was not the right one to begin with. Make sure you followed the instructions for using puttygen correctly. There is an example here: Convert PEM to PPK file format

Alternatively, use a windows ssh client that uses pem files directly. Two options are:

  1. Cygwin - it includes an ssh command line client.
  2. Poderosa


回答2:

U need a private key to connect to the server, the key U have probably is a public key, so U need to generate a private key in puttygen.



回答3:

Perhaps, you use Ubuntu AMI. Should be user name - ubuntu.
Link: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html#TroubleshootingInstancesConnectingPuTTY