Help Center/ CodeArts Agent/ FAQs/ Remote Development/ What Should I Do If a Remote Connection Fails with the Error "ETIMEDOUT"?
Updated on 2026-07-29 GMT+08:00

What Should I Do If a Remote Connection Fails with the Error "ETIMEDOUT"?

Symptom

ETIMEDOUT is displayed during remote connection.

Possible Causes

If the preceding message is displayed, try to reconnect first. If the retry fails, you are advised to use the command line (CMD) or an SSH client (such as PuTTY or Xshell) to establish a connection for further troubleshooting. If the issue persists, it usually indicates a network connection fault or a server fault.

Solution

  1. Check whether the remote host is powered on.
  2. Check whether the network connection to the remote host is working.

    You can run the ping command to check whether the connection failure is caused by a local network fault. However, some remote hosts may have ping disabled due to security group settings. In this case, you can run the tracert command instead. If a VPN is mounted locally, check whether the VPN configuration is correct and whether the target server can be connected using SSH. If the configuration is correct but the connection still fails, restart the VPN and check whether the connection can be restored.

  3. Check firewall settings.

    The firewall may block SSH connections. Check whether the firewall on the server is enabled. If it is enabled, ensure that traffic is allowed through the SSH port. Especially in scenarios where a jump server or Docker nesting is used, ensure that the port mapping is accurate and that the Docker port is mapped. You can run the following ssh command to check:

    ssh username@ip -p port-number

    Run different firewall commands based on the remote host OS to check whether the firewall is enabled. If it is enabled, check the firewall rules to ensure that no rule blocks the SSH connection.

    • Ubuntu
           # Check the firewall status.
      
           sudoufw status
            # Check the opened ports.
           sudoufw show added
            # Add a rule that allows traffic to pass through the firewall.
            # Example 1: Allow access to port 6379.
           sudoufw allow6379
            # Example 2: Allow access to ports 80 to 90, such as 80, 81, 82, ..., 90.
           sudoufw allow80:90/tcp
    • CentOS
            # Check the firewall status.
            systemctl status firewalld
            # Or
           firewall-cmd  --state
            # View all opened ports.
           firewall-cmd  --list-ports
            # For example, run the following command to add TCP port 23 as an exception for the firewall. If "success" is returned, the operation is successful.
           firewall-cmd  --zone=public  --add-port=23/tcp  --permanent

  4. Check security group rules.

    If security group rules are configured for the server, check the inbound rules to ensure that the remote login port (for example, port 22 for SSH) is allowed.