This topic describes how to connect to a host that is deployed in an ApsaraDB MyBase dedicated cluster.

You can use one of the following methods to connect to a host:

Use a bastion host to connect to a host

Prerequisites

Procedure

  1. Log on to the ApsaraDB MyBase console.
  2. In the upper-left corner of the page, select a region.
  3. Find the cluster that you want to manage and click Details in the Actions column.
  4. In the left-side navigation pane, click Bastion Hosts. Find the bastion host that you want to manage, and click Associate with Bastion Host in the Actions column.
    Associate a bastion host with an ApsaraDB MyBase host
  5. Select the ApsaraDB MyBase host to which you want to log on and click Next.
    Next
  6. Create a bastion host account.
    1. Click Create Bastion Host Account. On the Create Bastion Host Account dialog box, configure the following parameters.
      Create an account
      Parameter Description
      Username The username of the account that can be used to log on to the bastion host. The username must meet the following requirements:
      • The username can be up to 50 characters in length.
      • The username contains at least three of the following types of characters: uppercase letters, lowercase letters, digits, and special characters.
      • Special characters are underscores (_), hyphens (-), commas (.), and percent signs (%).
      Password The password of the account that can be used to log on to the bastion host. The password must meet the following requirements:
      • The password can be 8 to 64 characters in length.
      • The password contains letters, digits, and special characters.
      • Special characters include at signs (@), number signs (#), and dollar signs ($).
      Confirm Password Enter the password of the account to confirm that you entered the correct password.
      Name Your name. You can enter up to 100 characters in length.
      Email Address Optional. Your e-mail address.
      Phone Number Optional. Your phone number.
    2. Click Create.
  7. Authorize the bastion host account to log on to the ApsaraDB MyBase host.
    1. Find the bastion host account and click Authorize Host in the Actions column. This way, you can log on to the Bastionhost console. Authorize the bastion host account to log on to the ApsaraDB MyBase host
    2. On the Users page, find the bastion host account and click Authorize Hosts in the Actions column. Authorize the bastion host account to log on to the ApsaraDB MyBase host
    3. On the Authorized Hosts tab, click Authorize Hosts.
    4. In the Authorize Hosts panel, select the ApsaraDB MyBase host to which you want to log on and click OK.
      Note After the authorization is completed, go to the Authorize Host wizard. Click View Authorized Hosts in the Authorized Host column to check the hosts to which you can log on by using the bastion host account.
  8. Log on to the ApsaraDB MyBase host.
    1. Log on to the bastion host by running the ssh command on your terminal. Use the following command syntax:
      ssh <Username>@<Bastion host O&M address> -p<Bastion host port>
      Note
      • Username specifies the username that you use to create the bastion host account.
      • Bastion host O&M address specifies the public endpoint of the bastion host. You can check the public endpoint of the bastion host on the Bastion Hosts page.
      • Bastion host port specifies the port number of the bastion host. Default value: 60022.

      Examples

      ssh test@wdd*****-public.bastionhost.aliyuncs.com -p60022
    2. Enter the password of the bastion host account.
    3. Move the pointer over the ApsaraDB MyBase host and press Enter.

Use a webshell to connect to a host

Prerequisites

Procedure

  1. Log on to the ApsaraDB MyBase console.
  2. In the upper-left corner of the page, select a region.
  3. Find the dedicated cluster that you want to manage and click Details in the Actions column.
  4. In the left-side navigation pane of the details page, click Hosts. On the page that appears, use one of the following methods to connect to the host:
      1. Find the host to which you want to connect, click More in the Actions column, and then click Remote connection. Connect to the host
      2. In the message that appears, click OK.
      1. Find the host to which you want to connect and click Details in the Actions column.
      2. On the Host Information tab, click Remote Connection. Connect to the host
  5. Check whether you are logged on to the host.
    • The following figure shows that you are logged on to a host that uses the AliLinux image type in an ApsaraDB MyBase for MySQL or ApsaraDB MyBase for PostgreSQL dedicated cluster.s
    • The following figure shows that you are logged on to a host that uses the Windows image type in an ApsaraDB MyBase for SQL Server dedicated cluster.windows
    Note The system automatically connects to the host from the server. You do not need to enter the username or password of your account.