Updated on 2025-07-08 GMT+08:00

Installing the Agent on Huawei Cloud Servers

Scenario

You can enable HSS for servers only after installing the agent. This section describes how to install the agent on Huawei Cloud servers.

For details about how to install an agent on a third-party server, see Connecting a Third-Party Server to HSS Using Direct Connect and a Proxy Server.

Prerequisites

  • The settings of security group outbound ports, DNS server addresses, and third-party security software are appropriate and do not hinder agent installation. You have performed the operations in Checking the Installation Environment.
  • The VPCOperatePolicy and VPCEPOperatePolicy permissions have been granted to HSS. For details, see Authorization.

Constraints

  • The HSS agent has been embedded into Workspace images. If you purchase Workspace 23.6.0 or later, the agent will be automatically installed. If your Workspace version is earlier than 23.6.0, you can manually install the agent by referring to this section.
  • To install the agent on a target ECS on the HSS console, ensure there is already an executor ECS, which is in the same VPC as the target ECS and has an online HSS agent. If there are no executor ECSs, install the agent on an ECS by referring to Using the Commands or Script to Install the Agent on Huawei Cloud Servers (Current-Account Installation).

Agent Installation Modes

HSS supports two installation modes. For details about their differences, see Table 1.

Table 1 Installation modes

Agent Installation Mode

Description

Scenario

Reference

GUI

It is easy and more efficient than installing the agent using commands. To install the agent in this mode, you simply need to provide HSS with the server username-password pair or key. HSS does not store the password file you upload.

Before installation, ensure there is already an executor ECS, which is an ECS with an online agent in the same VPC as the target ECS. If there are no executor ECSs, install the agent on an ECS by referring to Using the Commands or Script to Install the Agent on Huawei Cloud Servers (Current-Account Installation).

There is at least one server with an online agent in the VPC of the servers where the agent is to be installed.

Installing the Agent on Huawei Cloud Servers on the HSS Console

Commands or script

To install the agent using the CLI or script, you need to log in to the server and run commands or a script. This method is more complex and slower than installation on the GUI.

The operations for current-account and cross-account installation are as follows:

  • Current-account installation: The target servers and the HSS quota you purchased are under the same account. You can log in using this account to obtain the installation commands or script and install the agent on the servers.
  • Cross-account installation: The target servers and the HSS quota you purchased are under different accounts. You can log in to account A to obtain the installation command or script, and install the agent on the target server under account B. After the agent is successfully installed, you can view the target server on the Asset Management > Servers & Quota page of account A.
  • Install the agent for the first time.
  • There are no servers with an online agent in the VPC of the servers where the agent is to be installed.
  • Manage and protect servers across accounts.

Installing the Agent on Huawei Cloud Servers on the HSS Console

You can install the agent on servers on the HSS console. Various installation methods are provided below.

Using the Commands or Script to Install the Agent on Huawei Cloud Servers (Current-Account Installation)

The HSS agent can be installed using commands. You can install the agent on different OSs. Various installation methods are provided below.

Using the Commands or Script to Install the Agent on Huawei Cloud Servers (Cross-Account Installation)

Assume you have two accounts. Account A is your management account. It needs to manage the servers under account B, a member account. You can log in to account A, copy the agent installation command or script, and run it on a server under account B. After the agent is installed, you can choose Asset Management > Servers & Quota under account A to view the servers and enable HSS for them. In this way, servers can be protected across accounts.

You can install the agent on different OSs. Various installation methods are as follows. The procedures assume you have account A (management account) and account B (its servers need to be managed by account A).

FAQ

For details about how to troubleshoot the agent installation failure, see

Follow-up Procedure

After the agent is installed on the server or container node, enable protection.