Updated on 2026-11-09 GMT+08:00

Creating a Resource Account

A host or application resource may have multiple accounts configured. Each account of a managed host or application resource is considered as a managed resource account. You do not need to enter the username or password when you log in to a managed host using its managed resource accounts.

If no accounts are added for a host or application resource, the Empty account is generated by default. In this situation, when you log in to the host or application resource through your bastion host, a username and password are required.

Constraints

  • Automatic login accounts cannot be configured for Microsoft Edge application resources.
  • If the AD domain service is installed on the managed resources, the account to be added is Domain name\Host account username, for example, ad\administrator.

Prerequisites

  • You have the operation permissions for the Account module.
  • You have added host or application resources.

Adding an Account for a Resource

  1. Log in to your bastion host system.
  2. Choose Resource > Account in the navigation pane.
  3. Click New. In the dialog box displayed, configure resource account attributes.

    Figure 1 New Account
    Table 1 Parameters for new managed resource accounts

    Parameter

    Description

    Resource

    Host or application resource to be related to the account.

    Login Type

    Select a login type.

    • If you select Auto Login, Account and Password are mandatory.
    • If you select Manual Login, you can configure Account.
    • If you select CSMS Credentials Login, you need to select an existing credential.
    • If you select Sudo Login, a password is mandatory. Sudo Login is valid only for SSH hosts. After you select this option, Switch From and Switch Command are mandatory. You can escalate the privilege of the original resource account to a privileged account.

    Account

    Account name of the managed resource. The value of Account must be unique in a bastion host and cannot be changed after it is created.

    • If you select It's a sudo account, the account is identified as a sudo account for managing resources and has the password change permission.
    • If the AD domain service is installed on the host, the added account is DomainName\HostAccountName, for example, ad\administrator.

    Password

    Password of the account being added

    By default, Verify is selected. After the account is added, the system automatically verifies the status of the account.
    • After the account is verified, the resource information is saved.
    • If the verification fails, modify the configuration as prompted.
      • If the system prompts that the account verification times out, return to the configuration window and modify the resource information. If the root account is used, ensure that the root login permission has been enabled on the host.
      • If the system prompts that the account password is incorrect, return to the configuration window and change the account password.

    Verify Database

    When Resource is set to a MongoDB resource, you need to configure the authentication database used to authenticate the current account at login.

    The value can contain a maximum of 63 characters and cannot contain null characters \0, spaces, or the following characters: /\."$.

    Postgresql/Gaussdb/DB2/Oracle Param

    This parameter is available when you select a PostgreSQL, GaussDB, DB2, or Oracle resource for Resource.

    Enter database names to specify the databases that the current resource account can access. You can specify up to 20 databases.

    SSH Key

    This parameter is available when you select an SSH resource for Resource.

    Configure SSH key authentication. After the configuration is complete, the SSH key is preferentially used to log in to the SSH host resource. An RSA private key in PEM or RFC4716 format is supported.

    Passphrase

    This parameter is available when you select an SSH resource for Resource.

    Private key sequence corresponding to the SSH key. This parameter is optional.

    • You do not need to enter the password for logging in to the host when no private key password is generated.
    • You need to enter the private key password each time you log in to the host when the private key password is generated.

    CSMS Credentials

    This parameter is available when Login Type is set to CSMS Credentials Login.

    Select the CSMS credential to be managed.

    Switch From

    This parameter is available when Resource is set to an SSH resource and Login Type is set to Sudo Login.

    Select the source account to switch from.

    Switch Command

    This parameter is available when Resource is set to an SSH resource and Login Type is set to Sudo Login.

    Configure the corresponding switching command, for example, su root.

    Login Role

    This parameter is available when you select an Oracle resource for Resource.

    Select a role for logging in to the host resource.

    Description

    Brief description of the account.

  4. Click OK. The newly created account will be displayed in the account list.

Batch Importing Accounts of Managed Resources into Your Bastion Host

You can configure resource account information in a CSV, XLS, or XLSX file and import the file to create resource accounts in batches.

  1. Log in to your bastion host system.
  2. Choose Resource > Account in the navigation pane.
  3. Click in the upper right corner of the page. The configuration window is displayed.

    Figure 2 Import Account

  4. Click Download to download the template.
  5. Enter the account information to be imported based on the configuration item description in the template file. Click Upload to upload the file.
  6. Configure more options by referring to Table 2.

    Table 2 More options

    Parameter

    Description

    Override existing accounts

    • Selected: A managed resource account will be overwritten by the one being imported if both accounts have the same name.
    • Deselected (default): A managed resource account will be skipped when the one being imported and the managed resource account have the same name.

    Verify Account

    • Selected (default): The account status is verified when it is imported.
    • Deselected: The account status will not be verified when it is imported.

  7. Click OK.

    Return to the resource account list and view the imported resource accounts.

Batch Creating Resource Accounts

You can create resource accounts for multiple servers of the same protocol type in batches.

  1. Log in to your bastion host system.
  2. Choose Resource > Host in the navigation pane. The host list page is displayed.
  3. Select the hosts for which you want to create accounts and choose More > Add Account.

    Only hosts with the same protocol type are supported.

  4. Enter the account information to be added, as shown in Table 3.

    Table 3 Parameters for creating resource accounts in batches

    Parameter

    Description

    Login Type

    Select the login mode of the created accounts.

    • Auto Login
    • Manual Login
    • CSMS Credentials Login
    • Sudo Login

    Account

    Enter a custom name for the account.

    If the login mode is set to automatic login, this parameter is mandatory.

    Password

    Enter a password for the account.

    SSH Key

    This parameter is mandatory if the current account needs to log in to the system using an SSH key.

    The RSA private key in PEM or RFC4716 format is supported. After the RSA private key is entered, the SSH key is preferentially used for login.

    passphrase

    Password of the SSH key. You need to enter the SSH key first. If the SSH key is password-free, you do not need to set this parameter.

    CSMS Credentials

    This parameter is mandatory only when Login Mode is set to CSMS Credentials Login.

    Description

    Provide a description of the current account.

    A maximum of 128 characters can be entered.

    Options

    Select an option.

    • Overwrite existing account: You can select this to overwrite the existing accounts that have the same usernames as that of accounts you are creating.
    • Verify Account: Check whether the added account can be used to log in to the system. This option can be selected only when the automatic login mode is used.

  5. Confirm the information and click OK.