All Products
Search
Document Center

Bastionhost:Add hosts

Last Updated:Jul 08, 2024

Bastionhost allows you to perform O&M operations on hosts from different sources, such as Elastic Compute Service (ECS) instances, servers in on-premises data centers, and servers on other cloud platforms. Before you perform O&M operations on hosts by using a bastion host, you must import the hosts to the bastion host. This topic describes how to import hosts to a bastion host.

Import ECS instances within the current account

You can import multiple ECS instances within the current Alibaba Cloud account to your bastion host at a time. Before you import an ECS instance, make sure that the ECS instance is created. For more information, see Create an instance on the Custom Launch tab.

Note

This operation does not affect the current status of the imported ECS instance.

  1. Log on to the Bastionhost console. In the top navigation bar, select the region in which your bastion host resides.

  2. In the bastion host list, find the bastion host that you want to manage and click Manage.

  3. In the left-side navigation pane, choose Assets > Hosts.

  4. On the Hosts page, choose Import ECS Instances > Import Instances of Current Account.

  5. In the Select Region dialog box, select the region of the ECS instances that you to import and click OK.

  6. In the Import ECS Instances dialog box, select the ECS instances that you want to import and click Import.

Import the ECS instances of members

Bastionhost allows you to manage the assets within multiple accounts in a centralized manner. If you have multiple Alibaba Cloud accounts, you can perform centralized O&M operations on the assets within these accounts by using a bastion host based on Resource Directory. To import the ECS instances of a member to your bastion host, you must add the member to the bastion host first. For more information, see Multi-account management.

  1. Log on to the Bastionhost console. In the top navigation bar, select the region in which your bastion host resides.

  2. In the bastion host list, find the bastion host that you want to manage and click Manage.

  3. In the left-side navigation pane, choose Assets > Hosts.

  4. On the Hosts page, choose Import ECS Instances > Import Instances of Member Accounts.

  5. In the Select Alibaba Cloud Account step, select an Alibaba Cloud account whose ECS instances you want to import and click Next.

  6. In the Select Region step, select the region of the ECS instances that you want to import and click OK.

  7. In the Import ECS Instances dialog box, select the ECS instances that you want to import and click Import.

Import hosts from other sources

Add hosts

You can manually specify host information to add a host on which you want to perform O&M operations to your bastion host.

  1. Log on to the Bastionhost console. In the top navigation bar, select the region in which your bastion host resides.

  2. In the bastion host list, find the bastion host that you want to manage and click Manage.

  3. In the left-side navigation pane, choose Assets > Hosts.

  4. On the Hosts page, choose Import Other Hosts > Create Host.

  5. In the Create Host panel, specify the parameters, such as Operating System, Host IP Address, and Hostname. Then, click Create.

    Parameter

    Description

    Operating System

    The OS of the host that you want to add. Linux and Windows are supported.

    Host IP Address

    The host IP address or domain name. IPv4 addresses and domain names are supported. For example, you can specify 192.168.XX.XX or www.example.com.

    Hostname

    The custom host name. The name must meet the following requirements:

    • It must be 1 to 128 characters in length.

    • It cannot start with a special character.

    • The supported special characters are periods (.), underscores (_), hyphens (-), and spaces.

    Network Domain

    The network domain of the host. The default value Direct Network (Direct Connection) is used. This indicates that the bastion host is directly connected to the host without using proxy servers. If your assets cannot communicate with the bastion host, you can use proxy servers to forward network requests. This way, you can perform O&M operations on the assets in different network environments. For more information about how to create a network domain, see Use the network domain feature.

    Asset Group

    The asset group to which the host belongs. You can create different asset groups based on your business requirements. Then, you can add the same type of hosts to a host group. This way, you can manage hosts of the same type at a time. For more information about how to create an asset group, see Manage asset groups.

    Remarks

    The remarks used to identify the host.

Import hosts from a file

You can use a template file to import multiple hosts to a bastion host at a time. The template package that you download contains template files in the XLS, CSV, and XLSX formats.

  1. Log on to the Bastionhost console. In the top navigation bar, select the region in which your bastion host resides.

  2. In the bastion host list, find the bastion host that you want to manage and click Manage.

  3. In the left-side navigation pane, choose Assets > Hosts.

  4. Select Import Hosts from File from the Import Other Hosts drop-down list.

  5. In the Import Hosts panel, click Download Host Template to download the template package. Decompress the package, open a template file, enter the host information, and then save the file.

  6. In the Import Hosts panel, click Upload to upload the template file that you saved.

  7. In the Preview dialog box, select the hosts that you want to import and click Import.

  8. In the Import Hosts panel, confirm the host information and click Import Hosts.

Import hosts from third-party asset sources

Before you import hosts from third-party asset sources, such as Tencent Cloud, Huawei Cloud, and Amazon Web Services (AWS), you must configure the access credentials of the asset sources in Bastionhost. For more information, see Manage third-party asset sources.

  1. Log on to the Bastionhost console. In the top navigation bar, select the region in which your bastion host resides.

  2. In the bastion host list, find the bastion host that you want to manage and click Manage.

  3. In the left-side navigation pane, choose Assets > Hosts.

  4. On the Hosts page, click Import Other Hosts and select the third-party asset source from which you want to import hosts.

  5. In the Import Third-party Hosts dialog box, select the host that you want to import and click Import.

References

  • After you add a host to a bastion host, you must also add the host account to the bastion host. For more information, see Manage a host account.

  • If the Remote Desktop Protocol (RDP) or SSH port used to perform O&M operations on the host is not the default port, you must modify the port. For more information, see Change the service port of a host.

  • For information about how to manage the added hosts, see Manage hosts.