Log on to a Linux instance using Workbench

更新时间:
复制 MD 格式

Workbench is a browser-based remote connection tool from Alibaba Cloud. It lets you connect directly to Linux instances, including those without a public IP address.

Prerequisites

  • Instance status: The instance must be in the Running state, and its Health Status must be Normal.

  • RAM permissions: RAM users must have the required permissions to use Workbench.

Method 1: Password-free login (Recommended)

Password-free login uses Session Manager by default. If Session Manager is not enabled, it uses a temporary SSH key pair instead.
  1. Log on to the ECS console - Instances. In the top navigation bar, select a resource group and a region.

  2. Find the target instance and click Connect. In the dialog box, for the Workbench option, click Sign in now.

  3. On the Workbench Instance Login page, select Password-free login, enter a User Name, and then click Log In.

    The following figure shows a successful login.

    image

Important

A Workbench remote connection session lasts for a maximum of 6 hours. A session also automatically disconnects after a long period of inactivity. In either case, you must reconnect. We recommend that you run long-running tasks in the background.

Method 2: SSH connection

  1. Log on to the ECS console - Instances. In the top navigation bar, select a resource group and a region.

  2. Find the target instance and click Connect. In the dialog box, for the Workbench option, click Sign in now.

  3. On the Workbench Instance Login page, configure the following parameters and click Log In.

    Parameter

    Description

    Instance

    The information about the current instance is automatically populated.

    Connection Method

    Select SSH connection. This method uses the SSH protocol to connect to the instance.

    Authentication Method

    Important

    SSH key authentication is more secure than password-based authentication. We recommend that you bind an SSH key pair and use it to log on for enhanced security.

    SSH key authentication

    • User Name: The default username for a Linux instance is root.

      If you specified ecs-user as the username when you created the instance, enter ecs-user.
    • Private key: Enter the content of your private key. If the private key is protected by a passphrase, you must also enter the Passphrase.

      To avoid entering the username and private key for each login, you can save the key as a credential.
    • SSH Port (Optional): The default SSH connection port is 22. You can change the port on the Instance Login page under More Options > Port.

    Password authentication

    • User Name: The default username for a Linux instance is root.

      If you specified ecs-user as the username when you created the instance, enter ecs-user.
    • Password: If you have forgotten your password or have not set one, you must reset the password.

      To avoid entering the username and password for each login, you can save the password as a credential.
    • SSH Port (Optional): The default SSH connection port is 22. You can change the port on the Instance Login page under More Options > Port.

    After you click Log In, you may be prompted to add a security group rule to allow access from the Workbench IP address ranges to the instance's SSH port (default is 22). You can click Add Now to quickly configure the security group. The console displays the specific rule that is added.

    The following figure shows a successful login.

    image

Important

A Workbench remote connection session lasts for a maximum of 6 hours. A session also automatically disconnects after a long period of inactivity. In either case, you must reconnect. We recommend that you run long-running tasks in the background.

FAQ

Save passwords and SSH keys

To avoid entering your username and password every time you log on, you can save them as a credential for future use.

Credentials are private and can only be used by the user who created them.
  • Save a login credential

    When you log on to an instance, select the Save login credential option. Workbench saves the credential after a successful login.image

  • Log on with a credential

    To log on to an instance by using a saved credential, select the Use Credential option.image

How does password-free login work?

By default, password-free login uses a temporary SSH key pair. However, if Session Manager is enabled, the connection is preferentially established through the Session Manager channel.

How Workbench connects over a private network

When Workbench connects to an instance using a private IP address, Workbench automatically creates a reverse access rule in the instance's VPC to establish a secure, bidirectional communication channel. You can view or manage the rule in image > Private Links.

Default username of Linux instances

The default username for a Linux instance is root. If you selected ecs-user when you created the instance, use ecs-user.

Default instance password

Instances do not have a default or initial password. To set a password, you must reset the password.

Troubleshoot remote connection failures

If you cannot connect to an instance remotely, first use the self-service diagnostic tool below. You can also refer to Troubleshooting common connection issues for Linux instances.

  1. ClickEnter the self-service troubleshooting page and switch to the targetRegion.

  2. Under Instance Cannot Connect, click Start diagnosis. Select the affected instance and click Start diagnosis as prompted.

    image

  3. After the diagnosis is complete, follow the prompts to resolve the issue.