SSH Connection Issue: Unable to Connect to EC2 Instance After Changing Instance Type from t2 to t3

0

Hello everyone,

I encountered an issue I'm struggling to understand. I have an EC2 instance with a type of t2.micro, and it's working perfectly. However, when I change the instance type from t2 to t3, I can no longer connect to it via SSH. This problem occurs consistently with every t3 instance type I try. Oddly enough, when I switch back to t2 types, SSH connectivity is restored.

I've checked the instance status, and everything appears normal. The instance passes the 2 checks, but I still can't connect. I'm puzzled by this behavior and would appreciate any insights or suggestions. Thank you.

質問済み 1ヶ月前131ビュー
4回答
0
承認された回答

T3 is a Nitro-based instance type, T2 is not https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-nitro-instances.html#nitro-instance-types

I think it would be advisable to read the knowledge document Why is my Linux instance not booting after I changed its type to a Nitro-based instance type? and follow the recommended steps.

This also a good third-party explainer https://www.continuent.com/resources/blog/how-convert-aws-instance-family-t2-t3-enhanced-networking-amazon-linux-1

Also, when the instance is up and 2/2 checks passed and you're not able to SSH into it, are you able to connect using AWS Systems Manager Session Manager? https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-prerequisites.html

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

Hi, Please check the below steps and share the status if it doesn't work properly.

  1. Please check the inbound ssh port, 22, is opened properly.
  2. Check the DNS is solved at the client.
 $ dig <EC2 endpoint>
  1. EC2 is deployed in a public subnet.
AWS
エキスパート
hyp
回答済み 1ヶ月前
  • Hello Hyp,

    Thank you for your assistance and response.

    I have checked all the suggestions you provided, and everything appears to be working correctly. Moreover, I also considered that there might be an issue with the SSH client on the machine. To test this, I attempted to connect via the 'Serial Console' and 'Instance Connect' methods, but both attempts failed.

0

Hi,

Some other folks had similar issues in the past and fixed them: https://repost.aws/questions/QUG_Q2Tu0cQemkhTMoISVLtQ/convert-a-t2-instance-to-t3

Best,

Didier

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

Thanks for all the assistance! It appears the issue was related to an EBS volume. I had created and attached an EBS volume to the instance when it was a t2 instance, where the volume was mounted as /dev/xvdf. However, when changing the instance type to t3, the device name for the EBS volume changed, causing the fstab to fail and the instance to enter emergency mode.

回答済み 1ヶ月前

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

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

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

関連するコンテンツ