No supported authentication methods available(server sent: public key)

When you use Putty to connect to your AWS instance and get the error ‘No Supported authentication methods available’, check out whether you did the below.

  1. Either the user name is incorrect. If in case you are using Amazon Linux AMI it is mostly ec2-user.
  2. You are trying to connect without loading the private key you had downloaded. In Putty, go to Connection Tab -> Auth and then load the private key you had downloaded (the ppk file). Enter the hostname now in Session tab and click the open button. You should be able to login to the EC2 instance now.