Score:0

Migrating EC2 t2.medium to t2.large ssh issue

in flag

We have 2 EC2 instances - one for staging and one for production. They have a fairly similar setup.

Since we need to scale (while still staying on EC2), I want to change the type of the production instance from t2.medium to t2.large. My course of actions would be:

  1. Stop the machine
  2. Change the type
  3. Start the machine

Before doing this for production, I experimented for staging moving t2.micro -> t2.medium -> t2.large -> t2.micro - on all the steps the machine stayed accessible shortly after the change.

The production is lost for SSH whenever I switch it to t2.large. By this I mean that after I change to t2.large, it's not reachable anymore with a response:

ssh: connect to host ****.compute.amazonaws.com port 22: Connection refused

If I change it back to t2.medium - the SSH works again.

What might this unavailability be due to?

Tim avatar
gp flag
Tim
VM size should make no difference to SSH availability, and it never has for me. I suggest you take a snapshot of the working VM, you can do it on a schedule within the EC2 console using "Lifecycle Manager". Then try a t3.large or t3a.large (A = AMD), newer generation, better performance, cheaper see if it works. Move to a GP3 volume as well, faster and cheaper. But make sure you always do the snapshot before you do anything.
Vladyslav Zavalykhatko avatar
in flag
@Tim I indeed figured out that the type of the machine doesn't matter - SSH doesn't work in a random manner, not depending on the type. Thank you for the recommendations
Tim avatar
gp flag
Tim
Might be worth closing the question, then opening another question if you need help. But do look at t3 instance types, t2 are previous generation.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.