All Products
Search
Document Center

Elastic Compute Service:What do I do if issues occur when I use Workbench to connect to a Linux instance over SSH?

Last Updated:Dec 16, 2024

What do I do if a timeout error occurs when I use Workbench to connect to a Linux instance?

Problem description

When you use Workbench to connect to a Linux instance, an error message similar to the following message appears: Failed to log on to i-m5e****73a (47.*.*.157:3389) because the connection timed out.

Causes

The preceding issue may be caused by one of the following reasons:

  • The security group rules associated with the Linux instance deny Workbench connections.

  • The port used by the SSH process is not port 22, which is the default SSH port.

  • The firewall settings of the Linux instance deny Workbench connections.

Solution

Perform the following steps to troubleshoot the issue:

  1. Check the SSH port of the Linux instance. For more information, see Step 3: Check the ports and security groups of the instance.

    • The SSH port is not port 22.

      Change the SSH port to port 22 and connect to the Linux instance by using Workbench.

    • The SSH port is port 22.

      Proceed to the next step.

  2. Check the security group settings of the Linux instance to check whether the SSH port is open. For more information, see View security group rules.

    Note
    • In this example, port 22 is used. If you changed the default SSH port, use the new SSH port.

    • If the authorization object is not 0.0.0.0/0, specify the IP addresses of the instance that you want to access as the authorization objects. In this example, 47.96.60.0/24 and 118.31.243.0/24 are used.

    Rule direction

    Policy

    Priority

    Port range

    Authorization object

    Inbound

    Yes

    1

    Destination: 22/22

    • Source: 47.96.60.0/24 and 118.31.243.0/24

    • Source: 0.0.0.0/0

    • The SSH port is not open.

      To allow Workbench connections to the port, add a security group rule based on the preceding table to a security group of the instance. For more information, see Use Workbench to connect to a Linux instance over SSH.

    • The SSH port is open.

      Proceed to the next step.

  3. Check whether the firewall is enabled for the Linux instance to deny Workbench connections to the SSH port. Perform the following steps:

    1. Connect to the Linux instance by using Virtual Network Computing (VNC). For more information, see Connect to an instance by using VNC.

    2. Check the status of the firewall. For more information, see Enable or disable the system firewall on a Linux ECS instance.

      • If the firewall is enabled, disable the firewall and use Workbench to connect to the Linux instance.

      • If the firewall is disabled, proceed to the next step.

    3. If you still cannot use Workbench to connect to the Linux instance, we recommend that you use VNC to connect to the instance.

What do I do if the connection is denied when I use Workbench to connect to a Linux instance?

Problem description

When you use Workbench to connect to a Linux instance, the following error message appears: DefaultConnectFuture[root@/xxx.xxx.xx.xxx:22]: Failed (AnnotatedConnectException) to execute: Connection refused: /xxx.xxx.xx.xxx:22.

Cause

The SSH service is not enabled on the Linux instance.

Solution

Perform the following checks to troubleshoot the issue:

What do I do if I am prompted with an incorrect username or password when I use Workbench to connect to a Linux instance?

Problem description

When you use Workbench to connect to a Linux instance, the following error message appears: Failed to log on to the instance because the username or password is incorrect.

Causes

The preceding issue may be caused by one of the following reasons:

  • An incorrect username or password is used.

  • The SSH settings of the Linux instance do not allow logons of the root user.

Solution

Perform the following steps to troubleshoot the issue:

  1. If the username and password that you entered are incorrect, reset the password of the Linux instance. For more information, see Reset the logon password of an instance.

  2. If the username and password that you entered are correct, the SSH settings of the Linux instance may not allow logons of the root user. Use one of the following methods to resolve the issue: