Cannot SSH to an EC2 Hosted Ubuntu vpc instance

0

I am running into a wall trying to SSH using Putty from a Windows device and I get an error: ****No supported authentication methods available(server sent: publickey) when I attempt to run the command: ****

ssh -i keyname.pem ubuntu@ec2-xxx.compute-1.amazonaws.com

I get a connection timeout.

I've recreated the key a couple times and continue to get: access denied (publickey) errors.

1回答
0

Make sure your key is only readable by you - chmod 600 keyname.pem

Try ssh -vvv -i ... and see if it gives you any more details.

And this is just a hunch, I'm guessing it's the latest version of Ubuntu you've built your EC2 with; what version is running on the host that you're trying to SSH from?

It's possible the new version has deprecated some old & insecure encryption algorithms, but when attempting the initial key exchange your SSH client is only able to offer up these.

You can try spinning up an EC2 running an older version of Ubuntu and confirm that you can login with the key on this older version. If you can do that then it proves the keys are good.

profile picture
エキスパート
Steve_M
回答済み 1年前
profile picture
エキスパート
レビュー済み 1ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ