skip to Main Content

I have a few EC2 t2 instances, some of them are micro, and some are small and medium. All of these EC2 machines are accessible on port 22 via SSH.

Following are the specifications of my t2 machines:

  1. OS Ubuntu 14 or Ubuntu 16
  2. EBS attached
  3. Type classes are t2 micro, small, medium
  4. SSH access is given via port 22 in security group inbound rules.

I have decided to upgrade these machines to t3 or t3a class instances to save some cost. I have followed these steps as per the documentation:

  1. Stop the instance
  2. Instance Settings -> Change Instance type to t3
  3. Start the Instance

Everything works fine, no error anywhere in these 3 steps. But after the instance is in the Running state with both system and instance checks passed, I am not able to SSH on these machines. Error is

ssh: connect to host machine_ip_here port 22: Connection refused

Then I tried the following methods:

  • Revert the class type from t3 to t2 again, and SSH starts working.
  • Created a new t2 machine with the latest OS (Ubuntu 22) and upgrade that to t3, and SSH was working fine after the upgrade.
  • Created a new t3 machine, and verify SSH is working, detach its EBS, and then detach the root EBS of my t2 machine and connect it to the t3 new machine, SSH stop working.

What exactly is missing here?

2

Answers


  1. Restarting a EC2 instance might make this EC2 instance’s IP change, please check if IP is the same first.

    Login or Signup to reply.
  2. Before any actions, I would check the Instance log screenshot to verify that the instance boot process finished successfully. Also, check compatibility to understand if your resizing options make sense https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/resize-limitations.html
    When encountering the issue of not being able to SSH into an EC2 t3 instance after upgrading from t2, two things need to be checked:

    • Security group rules: Verify that the inbound rules in the security
      group allow access on port 22 from the new IP address.
    • ENA drivers: Ensure that the Elastic Network Adapter (ENA) drivers
      are enabled.

    In general, I suggest checking these two troubleshooting articles to get a better idea what might go wrong with boot process.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search