I’m trying to access my new Amazon Linux 2023 instance via PuTTY, but I keep receiving the error: "Disconnected: No supported authentication methods available (server sent: publickey)". I’ve double-checked my Security Group to ensure Port 22 is open, and I am using the .ppk file I generated from the AWS console's .pem key. Is this an issue with the default username, or is there a specific SSH protocol setting in Amazon Linux 2023 that is incompatible with older versions of PuTTY or FileZilla?
3 answers
The most frequent cause for this error in 2024 is an outdated SSH client attempting to connect to Amazon Linux 2023 (AL2023). AL2023 has deprecated the older ssh-rsa signatures in favor of more secure algorithms like rsa-sha2-256. If your PuTTY version is older than 0.78, it won't negotiate the modern handshake, resulting in the "server sent: publickey" rejection even if your key is correct. Simply upgrading your PuTTY or WinSCP to the latest version usually fixes this instantly. Additionally, verify you aren't using the wrong username; for Amazon Linux it is ec2-user, while for Ubuntu it must be ubuntu. If you've modified permissions on your home directory to 777, SSH will also block access for security reasons.
Are you sure the .ppk file was converted correctly using PuTTYgen, and did you remember to specifically browse for that file under Connection > SSH > Auth > Credentials in your PuTTY configuration?
I had this same problem last week. Upgrading PuTTY to the latest version fixed it immediately because the new Amazon Linux images require updated RSA signature support.
I agree with Laura. I spent hours debugging my keys only to realize my version of FileZilla was three years old. A quick update solved the "no supported methods" error right away!
Kevin, that's a classic mistake! Many users accidentally load the public key instead of the private .ppk in that field. Mark, another thing to check is if you've recently changed the permissions of the .ssh folder or the authorized_keys file itself. SSH is extremely picky; your .ssh directory should be set to 700 and the authorized_keys file to 600. If they are too "open" (like 777), the server will refuse to use them for authentication as a safety measure. You can check this through the AWS Instance Connect browser-based terminal if you can't get in via PuTTY.