내용으로 건너뛰기

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

질문됨 일 년 전157회 조회

1개 답변
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

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

관련 콘텐츠