Error No supported authentication methods available on AWS

0 votes

SSH to my AWS server just broke for both Putty and Filezilla. I'm making some effort for this post to be a comprehensive troubleshooting list, so if you share links to other stack overflow pages, I'll edit them into the question.

Disconnected : No supported authentication methods available (server sent :publickey)


The error is familiar from when I set up the connection almost a year ago. If you're setting up AWS SSH for the first time, these address the most common problems:

  • Wrong username: Disconnected : No supported authentication methods available (server sent :publickey)
  • Incorrect .ppk file: Unable to connect to amazon server using putty

However, the only thing I could think that would impact a previously working system is:

  • Wrong IP: Restarting an AWS instance (or creating an image) is not guaranteed to keep the same IP address. This would obviously have to be updated in putty.

What other possibilities are there?

Solution to this one (per the accepted post below) is that for AWS EC2 all 3 of these need to have proper permissions (777 not ok for any of these). Here's one example that works:

/home/ec2-user/ - 700
/home/ec2-user/.ssh/ - 600
/home/ec2-user/.ssh/authorized_keys - 600

Sep 27, 2018 in AWS by bug_seeker
• 15,510 points
32,316 views

2 answers to this question.

0 votes

Your problem can be related to incorrect login which varies depending on AMIs. Use following logins on following AMIs:

  • ubuntu or root on ubuntu AMIs

  • ec2-user on Amazon Linux AMI

  • centos on Centos AMI

  • debian or root on Debian AMIs

  • ec2-user or fedora on Fedora

  • ec2-user or root on: RHEL AMI, SUSE AMI, other ones.

If you are using 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

Good luck.

answered Sep 27, 2018 by Priyaj
• 58,020 points
0 votes

Diff from other answers above:

I received this authentication error- No supported authentication methods available (server sent: publickey) repeatedly while connecting to my google cloud platform and connecting thru FileZilla, even when I had spent hours checking my each of my steps again and again by watching diff youtube videos and reading articles over Digital Ocean and similar.

But finally succeeded in a second, when I went into GCloud> Desired Project> Compute Engine> Metadata (in the left bar)> Metadata (in the main Pane)> and there I changed ' enable-oslogin' from 'True' to 'False'.

I had, sometime in my overzeal, had put in this key yesterday while doing something else.

You can even check out the details from the AWS Training.

answered Mar 25, 2019 by Bathinda
• 140 points
Hey @Bathinda, I am not pretty sure about GCP, but yes maybe this could also be the case in AWS.

Related Questions In AWS

0 votes
1 answer

No Supported Authentication Methods Available” on SFTP

If you're getting the "No Supported Authentication ...READ MORE

answered Oct 26 in AWS by Piyu
202 views
0 votes
1 answer

Error: 'No package Tableau server available on the EC2 Linux instance'

Hi, Tableau may not come with your ISO ...READ MORE

answered Oct 20, 2020 in AWS by MD
• 95,460 points
865 views
0 votes
1 answer

A strange spark ERROR on AWS EMR

Those warning messages can be suppressed by ...READ MORE

answered Jul 13, 2018 in AWS by Flying geek
• 3,280 points
1,646 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Getting memory leak error on AWS EMR - Saving Dataframe into hive external table on S3 -

You can start by creating  a temp ...READ MORE

answered Aug 9, 2018 in AWS by Priyaj
• 58,020 points
1,522 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP