Skip to content

Unable to Login to EC2 Instance After Migration To Elastic Cloud Server in Huawei Cloud Stack

0

I recently migrated an EC2 instance to an Elastic Cloud Server (ECS) within the Huawei Cloud Stack environment (BTC Data Center) as part of a cloud migration initiative. The migration completed successfully, and all data and files were transferred correctly.

However, I am currently unable to remotely access the ECS instance on the new host. During the migration, I was not prompted to set or configure a username and password. As a result, I cannot log in remotely to manage or verify the system.

I am requesting guidance on how to safely regain access to the ECS instance—either by:

Recovering or resetting the username and password

Gaining access through any secure alternative method

asked a year ago141 views

1 Answer
0

I’ve seen this happen when moving workloads between platforms the data copies fine, but the authentication flow doesn’t survive the migration cleanly. In AWS, we’d handle this with Systems Manager or key injection, but Huawei Cloud Stack works a little differently.

Here’s how I’d approach it:

Check your migration method

  • If the migration was done at the image/disk level, the original OS credentials from the EC2 instance should still work. For Linux, that means the original key pair/private key; for Windows, the original admin password.
  • If you didn’t bring over the key pair or never set a password on the EC2 side, you’ll need to inject new credentials.

Use the Huawei Cloud Console to inject a new key pair or password

  • Stop the ECS instance.
  • In the console, attach a key pair to the instance (Huawei calls it “Binding a Key Pair”). This will allow SSH/RDP without the original credentials.
  • For Windows ECS, you can reset the password directly from the console before starting the instance again.

Mount the system disk to a rescue instance (last resort)

  • Detach the root disk from the ECS.
  • Attach it as a secondary disk to another instance you control.
  • Edit the /etc/ssh/sshd_config or SAM database (Windows) to allow new access, or inject your public SSH key into ~/.ssh/authorized_keys.
  • Reattach it to the original ECS and boot it up.

Document the login info this time

  • After you regain access, set up both a key-based login and a password reset method in case you run into this again during future migrations.

Huawei’s docs on this: https://support.huaweicloud.com/intl/en-us/ecs_faq/ecs_faq_0304.html

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.