Global Cloud Global Cloud Contact Us

Huawei Cloud Master Account Registration Huawei Cloud ECS instance connection error fix

Huawei Cloud / 2026-05-15 13:28:08

Introduction: When Your ECS Won’t Talk Back

If you’ve ever tried to connect to a Huawei Cloud ECS instance and been greeted by an error message, you’re not alone. Connection errors are like gremlins: they’re small, they hide in corners, and they somehow appear right when you’re on a deadline. Maybe you typed the correct public IP, confirmed the port, double-checked the username, and still… nothing. Or you get a “timeout,” “connection refused,” authentication failures, or even mysterious “no route to host” vibes.

The good news is that most ECS connection errors come from a limited set of causes. The bad news is that those causes can be distributed across multiple layers: your client network, Huawei Cloud networking rules (security groups and network ACLs), the instance’s operating system firewall, the SSH/RDP service, and sometimes even the instance itself.

In this article, we’ll fix Huawei Cloud ECS instance connection errors systematically—like a detective who refuses to guess. You’ll follow steps to narrow down the issue quickly, verify what’s supposed to be open, and repair common configuration problems. We’ll also include practical commands and example scenarios. By the end, you’ll have a repeatable method and a checklist you can use the next time your ECS decides to ghost you.

What “Connection Error” Actually Means

Huawei Cloud Master Account Registration Connection errors aren’t all the same. The exact wording matters because it hints at the layer where things break. Here are common symptoms and what they often indicate:

  • Timeout (connection attempt just hangs): usually indicates routing/network path issues or firewall/security group blocks.
  • Connection refused: network can reach the host, but the port isn’t listening or the service is down.
  • No route to host: typically routing problem, wrong IP, or network path blocked.
  • Authentication failed: credentials wrong or SSH/RDP configuration changed.
  • Port closed / service not running: SSH daemon (sshd) or RDP services not running, or bound to a different interface/port.

Keep your error message handy. It’s like the clue on the back of the cereal box—annoying to find, but extremely useful once you do.

Before You Touch Anything: Confirm the Basics

Start with the unglamorous stuff. People skip this part, and then blame the cloud. Let’s not be that person.

Huawei Cloud Master Account Registration 1) Confirm you’re using the correct IP

On Huawei Cloud ECS, you might have a public IP, private IP, or both. If you try to connect using a private IP from outside the VPC/network, you’ll fail.

Check:

  • Is the instance assigned a public IP (EIP or automatically assigned public IP)?
  • Are you connecting to the correct IP associated with that instance?

If you’re connecting from the internet, you typically need the public IP. If you’re connecting from within the same VPC/VPN, private IP might be correct.

2) Confirm the instance status

ECS should be in a healthy running state. If the instance is stopped, restarting too often, or in some failed state, networking may not behave as expected.

Verify in the ECS console that the instance is running and not in a state where you can’t reach services.

3) Confirm the login method and port

Decide whether you’re using:

  • SSH: usually port 22 (but could be different)
  • RDP: usually port 3389

Make sure your client is trying the correct protocol and port.

Step One: Test Connectivity From the Client Side

Before you reconfigure anything on the cloud side, do a quick reality check from your computer. This tells you whether you’re blocked by networking/firewall or blocked by the instance service.

1) Quick port test with telnet/netcat

From your client machine:

  • Linux/macOS (example): nc -vz IP PORT
  • Windows PowerShell: Test-NetConnection -ComputerName IP -Port PORT

If the port test times out, you likely have security group/network ACL/firewall blocks. If you get “refused,” the instance is reachable but the service isn’t listening.

2) Check routing basics

If DNS is involved, make sure you’re not connecting to a wrong host. If you’re using DNS names, try the raw IP too (as long as you trust the IP you found). Also consider whether your local network blocks outbound ports—because corporate networks love doing that.

Step Two: Verify Huawei Cloud Security Groups

Think of a security group as the bouncer at the door. If you don’t make it past the bouncer, you won’t even get to the club.

Huawei Cloud Master Account Registration 1) Find the security group attached to the ECS

In the ECS or VPC console, locate the security group associated with your instance’s network interface.

2) Ensure inbound rules allow your source and port

For SSH, you want an inbound rule like:

  • Protocol: TCP
  • Port: 22 (or your custom SSH port)
  • Source: your IP address or a permitted range

For RDP, similar rules apply:

  • Huawei Cloud Master Account Registration Protocol: TCP
  • Port: 3389
  • Source: your IP address or a permitted range

A common mistake: allowing 22 from “0.0.0.0/0” is easy but often too broad. Another common mistake: allowing from the wrong IP range, so your traffic gets tossed. If you’ve recently changed networks (home vs office vs VPN), your source IP might also have changed.

3) Confirm no conflicting rules

Depending on how Huawei Cloud models security groups, rules may be stateful and combined in specific ways. The principle stays the same: the inbound must allow the traffic you’re attempting.

If you’re unsure, temporarily add a rule for your current source IP, test again, then later tighten it. Troubleshooting is like meal prep: it can be messy while you figure out the recipe.

Step Three: Check Network ACLs (If Used)

Network ACLs (Access Control Lists) are like a cranky librarian with a list of allowed pages. Security groups are usually enough for many setups, but if ACLs exist, they can still block.

1) Identify whether the subnet uses network ACLs

If your VPC configuration includes network ACLs for the subnet, check the inbound/outbound rules for your port and traffic direction.

2) Confirm TCP traffic for the relevant port is allowed

For SSH: TCP 22. For RDP: TCP 3389. If your instance uses a non-standard SSH port, match it.

If you see inbound blocked, fix the ACL rules. After any changes, allow a moment for them to propagate, then retry the connection test.

Step Four: Verify Public IP Assignment and Routing

Sometimes the problem isn’t “firewall”—it’s simply that the public IP you’re using isn’t actually reachable or isn’t mapped to your instance correctly.

1) Confirm public IP is bound to the instance

If you rely on an Elastic IP or a public IP, ensure it’s associated with the ECS network interface you expect.

2) Check whether you’re using the correct region and network

Huawei Cloud is organized by regions and VPCs. It’s surprisingly easy to copy an IP from one environment into another. That’ll lead to timeouts or “no route” problems.

Step Five: Check the Instance’s OS Firewall

Now we’re past the cloud-level bouncers. But the instance itself may have its own firewall. If the OS firewall blocks inbound SSH/RDP, you’ll still fail even if Huawei Cloud rules are correct.

Linux instance firewall checks

Common firewall tools include:

  • ufw
  • firewalld
  • iptables/nftables

Try one at a time, depending on your distribution.

ufw

Run:

  • sudo ufw status

If ufw is active and you need SSH, allow the port:

  • sudo ufw allow 22/tcp

If your SSH runs on a different port, allow that port instead.

Huawei Cloud Master Account Registration firewalld

  • sudo firewall-cmd --state
  • sudo firewall-cmd --list-all

Huawei Cloud Master Account Registration Then allow SSH:

  • sudo firewall-cmd --permanent --add-service=ssh
  • sudo firewall-cmd --reload

If SSH uses a custom port, add it as a port instead of using the service.

iptables / nftables

If you’re using iptables, you’d typically inspect rules:

  • sudo iptables -S

And then allow TCP 22 inbound if needed. nftables has a different syntax; if you’re not already comfortable with it, be cautious. One wrong rule can lock you out permanently, which is a fun way to discover that cloud troubleshooting can also teach lessons about humility.

Windows instance firewall checks

If it’s a Windows ECS and you’re using RDP, verify Windows Firewall allows inbound RDP.

In PowerShell as Administrator:

  • Get-NetFirewallRule -DisplayGroup "Remote Desktop"

If rules are disabled, enable them (or re-create them via Windows settings). Also confirm that RDP is enabled in System properties if needed.

Step Six: Confirm SSH/RDP Services Are Running

Let’s consider the classic “connection refused” scenario. That usually means the network path and port opening are fine, but the service isn’t listening.

Linux: Check SSH daemon (sshd)

On most Linux distributions:

  • sudo systemctl status ssh
  • or sudo systemctl status sshd

Start it if needed:

  • sudo systemctl start ssh
  • or sudo systemctl start sshd

Enable on boot:

  • sudo systemctl enable ssh

Verify sshd is listening on the expected port

Use:

  • sudo ss -tulpen | grep -E ':22\s'
  • or sudo netstat -tulpen | grep ':22'

If it’s listening on a different port, adjust your security group rule and/or SSH configuration.

Check SSH configuration for port and binding

Huawei Cloud Master Account Registration SSH config is usually in:

  • /etc/ssh/sshd_config

Look for:

  • Port (default 22)
  • ListenAddress (if restricted)
  • PermitRootLogin
  • PasswordAuthentication (if you use passwords)
  • PubkeyAuthentication

Huawei Cloud Master Account Registration If you change config, restart the service:

  • sudo systemctl restart ssh
  • or sudo systemctl restart sshd

Then try again.

Common SSH connection mistakes

  • Wrong username: You can have perfect keys and still fail if the account name is wrong.
  • Missing authorized_keys: Pubkey authentication won’t work without correct key placement.
  • Key permissions are too open: SSH is picky. Permissions like 777 on home folders can cause SSH to reject keys.
  • Fail2ban bans you: If you made multiple failed attempts, you might be temporarily blocked.

Windows: Check RDP service and listening port

On Windows, RDP uses the Remote Desktop Services. Check that RDP is enabled and the service is running.

Also verify the port is listening:

  • netstat -ano | findstr :3389

If 3389 isn’t listening, RDP isn’t ready. Enable it through Windows settings or ensure the Remote Desktop Services service is running.

Step Seven: Authentication Errors (Not a Networking Problem—Usually)

If your connection reaches the server but you get authentication failures, don’t keep changing security group rules like you’re spinning a slot machine. That won’t fix a “wrong key” problem.

Linux SSH authentication troubleshooting

First, try verbose SSH output from your client:

  • ssh -vvv user@IP

This will show which authentication method is being attempted and why it fails.

Then check on the server:

  • Is the user account present?
  • Do you have the public key in the right file (usually ~/.ssh/authorized_keys)?
  • Are permissions correct?

Typical permissions for SSH keys on Linux:

  • ~/.ssh should be 700
  • authorized_keys should be 600

Use:

  • chmod 700 /home/user/.ssh
  • chmod 600 /home/user/.ssh/authorized_keys

(Adjust paths/user accordingly.)

Windows RDP authentication troubleshooting

If you reach the RDP prompt but authentication fails:

  • Confirm username format (local user vs domain). For local accounts, you may need “COMPUTERNAME\username” or “.\username”.
  • If using a password, confirm it hasn’t expired.
  • Ensure you’re not mixing a key-based credential setup (SSH) with password-based RDP expectations.

Step Eight: Instance-Side Logs Tell the Story

Logs are the narrative voice of your server. When you read them, the gremlins usually confess.

Linux SSH logs

Depending on the distro and configuration, SSH logs are often in:

  • /var/log/auth.log (Debian/Ubuntu)
  • /var/log/secure (RHEL/CentOS/Fedora)

Example commands:

  • sudo tail -n 200 /var/log/auth.log
  • sudo tail -n 200 /var/log/secure

Look for entries around the time you attempted to connect: “Failed password,” “Accepted publickey,” “connection closed,” or errors about sshd startup.

Linux firewall and service logs

If SSH attempts are blocked, logs might show firewall denies. Also check if sshd is failing to start due to config errors. A common one: a syntax error in sshd_config leading to service not running.

Windows logs

On Windows, check Event Viewer for RDP-related events. Look for RemoteDesktopServices logs or security login failures. Time your log viewing to your connection attempts so you can correlate cause and effect.

Step Nine: Use a Rescue Approach if You’re Locked Out

Sometimes you misconfigure firewall rules or SSH settings and lose access. This happens more often than anyone admits over coffee.

In these cases, consider:

  • Using ECS console features (if available) for password reset or remote console access.
  • Using a serial console or VNC-like access if your environment supports it.
  • Rebuilding the instance from an image if it’s safe to do so.

The exact tools vary by environment and permissions, but the idea is consistent: regain access so you can repair service/firewall settings.

Troubleshooting Scenarios (Common and Curiously Specific)

Scenario 1: You get “Connection timed out”

Most likely causes:

  • Security group inbound rule doesn’t allow your port from your IP.
  • Network ACL blocks traffic.
  • Wrong public IP (or public IP not attached).
  • Instance firewall blocks inbound traffic.
  • You’re connecting from a network that blocks outbound to that port.

Huawei Cloud Master Account Registration Fix order:

  • Re-test with a port check from your client.
  • Verify security group inbound rule for TCP and correct port.
  • Verify network ACLs (if in use).
  • Verify instance OS firewall allows inbound SSH/RDP.

Scenario 2: You get “Connection refused”

Most likely causes:

  • SSH/RDP service is not running.
  • Service is listening on a different port.
  • Service is bound to a specific interface rather than 0.0.0.0.

Fix order:

  • Confirm service status (systemctl status for Linux; services for Windows).
  • Confirm listening port with ss/netstat.
  • Check sshd_config (Port/ListenAddress) or Windows RDP settings.

Scenario 3: Authentication failed after connection succeeds

Huawei Cloud Master Account Registration Most likely causes:

  • Wrong username.
  • Wrong password or wrong private key.
  • authorized_keys not installed or permissions wrong.
  • Account locked or expired.

Fix order:

  • Use verbose client output (ssh -vvv).
  • Verify user existence and key placement.
  • Check server logs for why authentication was rejected.

Scenario 4: Works from one network but not another

This is often a source-IP or corporate firewall issue.

  • Security group allows only a specific IP range, and your other network has a different public IP.
  • Your other network blocks outbound connections to SSH/RDP ports.

Fix order:

  • Check your current client public IP.
  • Adjust security group inbound source accordingly.
  • Test again from a different network (like a mobile hotspot) if possible.

Scenario 5: You changed SSH port but forgot to update cloud rules

Classic. You update /etc/ssh/sshd_config to use port 2222, restart sshd, and then wonder why the internet still can’t reach it.

Fix:

  • Open TCP 2222 in the Huawei Cloud security group.
  • Update client connection command accordingly: ssh -p 2222 user@IP
  • Confirm sshd is listening on 2222.

Preventing Future Connection Headaches

Once you get it working, do yourself a favor and prevent recurrence. Here are practical habits that save time:

  • Maintain a connection checklist: IP, port, protocol, security group rules, instance firewall, and service status.
  • Document custom ports: If you change SSH port, write it down somewhere obvious.
  • Use least privilege for security group sources: Instead of 0.0.0.0/0 forever, add only your current office/home IP or VPN range.
  • Keep firewall rules consistent: Mirror what you allow in the OS firewall with what you allow in cloud security groups.
  • Monitor logs: Failures and service restarts leave traces.
  • Test from multiple networks: If it must be accessible from the internet, test from a non-VPN, non-local environment.

Also, consider using SSH keys over passwords for reliability and reduced friction. Passwords can work, but keys tend to be less dramatic when you forget which special character your brain used on that day.

Quick Checklist: Fix Huawei Cloud ECS Connection Errors in Order

If you just want the “do this, then that” path, here it is:

  1. Confirm IP: Are you using the correct public IP for internet access?
  2. Confirm instance status: Is the ECS instance running and healthy?
  3. Confirm port/protocol: SSH? RDP? Correct TCP port?
  4. Test from client: timeout vs refused tells you the direction.
  5. Security group: Inbound rule allows TCP port from your client IP/range.
  6. Network ACL (if present): allow inbound/outbound for that port.
  7. Instance OS firewall: allow SSH/RDP inbound.
  8. Service status: sshd/RDP service running?
  9. Listening port: does it actually listen on expected port/interface?
  10. Auth issues (if reached): correct username/key/password, permissions, logs.
  11. Read logs: auth.log/secure/event viewer for the exact reason.

Conclusion: You’re Not Stuck—You’re Just Methodical

Connection errors on Huawei Cloud ECS can feel like a mystery box, but they’re usually a solvable puzzle with limited pieces. By working from the outside in—client connectivity, cloud security group and network ACLs, then instance firewall and service—you’ll narrow down the cause quickly and avoid random configuration changes that make debugging harder.

Remember: timeouts usually mean traffic is blocked before reaching the service. Refused connections often mean the service isn’t listening. Authentication failures usually mean the network is okay but your credentials or key setup needs attention. And if you ever lock yourself out, treat it as a learning opportunity and use the console/rescue mechanisms available to you.

Now go forth and connect. May your ports be open, your services be running, and your security group rules always match your current IP like a well-trained pet that never forgets your snack order.

TelegramContact Us
CS ID
@cloudcup
TelegramSupport
CS ID
@yanhuacloud