1 Answer
- Newest
- Most votes
- Most comments
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
Relevant content
asked 5 years ago
asked 4 years ago
