Ubuntu SSH – Can’t Access New AWS EC2 Instance but Can Access Existing Instances

powershellputtysshUbuntu

I've created a new Ubuntu 22.04 AWS EC2 instance using an existing keypair (keypairA) and security group (secgroupA). But when I try to connect via SSH (Putty on Win10) I get the Following error:

No supported authentication methods available (server sent publickey)

This usually means I'm not using the correct key or username, but I'm sure I'm using the same correct details because I can connect via a different device (Terminal on OSX).

Also, I can connect to existing instances that are using the same keypair / security group without a problem.

What could be blocking my connection to the new servers? Could something be cached on my Win10 machine because I'm using the same keypair on different servers? It hasn't been any issue in the past.

Any advice?

UPDATE: The plot thickens. I can connect to the server via SSH using PowerShell on the same machine (Win10) that won't connect via Putty (0.74). The only difference is that I'm using the PEM file in PowerShell where as I'm using the PPK file in Putty. I'm not sure why PuttyGen isn't creating a PPK file Ubuntu likes…

UPDATE 2: It turns out if I create an Ubuntu 20.04 instance, I can connect using the PPK generated by Putty. If I then create an instance with Ubuntu 22.04 the PPK won't work. So between the 2 versions of Ubuntu there is a change in what PPK is supported. I'll continue investigating…

Best Answer

Updating Putty from 0.74 to 0.77 resolved the issue for me. Frustrating.

Related Question