All Products
Search
Document Center

Bastionhost:Perform SSH-based O&M

Last Updated:Mar 31, 2026

Connect to Bastionhost over SSH using a command-line tool or an SSH client such as Xshell, then select and access the managed hosts for O&M operations.

This topic covers the following connection methods:

Prerequisites

Before you begin, ensure that you have:

Note: Bastionhost assigns fixed O&M addresses in domain name format while using dynamic IP addresses to prevent attacks. The IP address resolved from the O&M address may change. Always use the domain name address to avoid O&M failures caused by IP address changes.

For compatible database O&M tools and versions, see Database O&M tools and versions.

概览

Usage notes

Log on to a bastion host by using a command-line tool

Password authentication

  1. Run the following command to connect to the bastion host:

    ssh <Username of the bastion host>@<O&M address of the bastion host> -p 60022
  2. Enter the password of the bastion host user.

  3. If two-factor authentication (2FA) is enabled, enter the verification code. For more information, see Enable two-factor authentication.

    image.png

  4. On the asset management page, press the up or down arrow key to select the host you want to access, then press Enter.

Token authentication

  1. Run the following command to connect to the bastion host:

    ssh <Username of the bastion host>@<O&M address of the bastion host> -p 60022
  2. When prompted for a password, enter your O&M token. For more information about how to get an O&M token, see Manage an O&M token.

  3. Select the host and perform O&M operations.

Public key authentication

  1. Run the following command to connect to the bastion host using your private key:

    ssh -i <Path to the private key file> <Username of the bastion host>@<O&M address of the bastion host> -p 60022
  2. If two-factor authentication (2FA) is enabled, enter the verification code. For more information, see Enable two-factor authentication.

    image.png

  3. On the asset management page, press the up or down arrow key to select the host you want to access, then press Enter.

Log on to a bastion host by using a client tool

The following steps use Xshell as an example.

Password authentication

  1. Open Xshell. On the File menu, click the New icon. In the Properties of New Session dialog box, click Connection in the left pane and enter the O&M address and SSH port number under General.

    ssh连接设置

  2. In the left pane, choose Connection > Authentication. Enter the bastion host username and password, then click OK.

    用户身份验证

  3. If two-factor authentication (2FA) is enabled, enter the verification code and click OK. For more information, see Enable two-factor authentication.

    MFA码

  4. On the asset management page, press the up or down arrow key to select the host you want to access, then press Enter.

Token authentication

  1. Open Xshell. On the File menu, click the New icon. In the Properties of New Session dialog box, click Connection in the left pane and enter the O&M address and SSH port number under General.

    ssh连接设置

  2. In the left pane, choose Connection > Authentication. Enter the bastion host username and O&M token, then click OK. For more information about how to get an O&M token, see Manage an O&M token.

    用户身份验证

  3. Select the host and perform O&M operations.

Public key authentication

  1. Open Xshell. On the File menu, click the New icon. In the Properties of New Session dialog box, click Connection in the left pane and enter the O&M address and SSH port number under General.

    ssh连接设置

  2. In the left pane, choose Connection > Authentication. Set Method to Public Key.

    image..png

  3. Click Setup. In the Setup Public Key dialog box, upload the private key file that matches the public key hosted on the bastion host, then click OK.

    image..png

  4. (Optional) If two-factor authentication (2FA) is enabled, enter the verification code and click OK. For more information, see Enable two-factor authentication.

    MFA码

  5. On the asset management page, press the up or down arrow key to select the host you want to access, then press Enter.

Search for assets

After logging on to the bastion host, use either of the following methods to find a specific asset on the asset management page:

  • Quick search: Type /+search content. Matching results are highlighted.

    image.png

  • Filtered search: Press [Search] to enter the search page, type ls <keyword>, and press Enter. The asset list filters to show only assets containing the keyword.

    For example, to filter assets containing "key", type ls key and press Enter.

    Note: For a full list of supported [Search] commands, type help or help ls on the search page.

    image.png