Fix: Disconnected No Supported Authentication Methods Available – AWS Putty

Fix: Disconnected No Supported Authentication Methods Available – AWS Putty

If you attempt to Putty (SSH) into an Amazon Web Services (AWS) Linux or Windows Amazon Machine Instance (AMI) instance, you may receive an error similar to below.

 

Disconnected: No supported authentication methods available

(server sent: publickey,gssapi-keyex,gssapi-with-mix)

 

You are most likely using an incorrect login username combination along with a private key. Per Amazon documentation here, use the following default login/usernames when connecting to your AMI instance.

 

  • For an Amazon Linux AMI, the user name is ec2-user.
  • For a Centos AMI, the user name is centos.
  • For a Debian AMI, the user name is admin or root.
  • For a Fedora AMI, the user name is ec2-user or fedora.
  • For a RHEL AMI, the user name is ec2-user or root.
  • For a SUSE AMI, the user name is ec2-user or root.
  • For an Ubuntu AMI, the user name is ubuntu or root.

 

Otherwise, if ec2-user and root don't work, check with the AMI provider.

 

If you are using the OS:

 

  • Windows - get PEM key from AWS website and generate PPK file using PuttyGen. Then use Putty to use the PPK (select it using left-column: Connection->SSH->Auth: Private key for authorization)
  • Linux
     - run: ssh -i your-ssh-key.pem login@IP-or-DNS</p">login@IP-or-DNS>

 







* Please use the comment form below. Comments are moderated.*



Related Posts

 

Comments 1

Guest - theapprenticeco on Tuesday, 11 July 2023 17:39

your article was very helpful,
I was stuck changing from .pem to .ppk and trying and trying again getting the same error:
No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)

Although I was in AWS, the default user was centos rather than ec2-user

Thanks a lot

your article was very helpful, I was stuck changing from .pem to .ppk and trying and trying again getting the same error: No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic) Although I was in AWS, the default user was centos rather than ec2-user Thanks a lot
Friday, 19 April 2024