Constraints
- The HSS agent will be automatically installed on Workspace 23.6.0 or later. If your Workspace version is earlier than 23.6.0, you can manually install the agent by referring to this section.
- When you install the agent for multiple servers in batches on the console, the system randomly selects a server in the same VPC as the executor.
Agent Installation Methods
HSS provides two installation methods. For details about their differences, see Table 1.
Installing the Agent on Huawei Cloud Servers on the HSS Console
You can install the agent on the HSS console. Various installation methods are as follows.
Using the Account and Password to Install the Agent on a Single Huawei Cloud Server
- Log in to the management console.
- In the upper left corner of the page, select a region, click , and choose Security & Compliance > HSS.
- In the navigation pane, choose .
If your servers are managed by enterprise projects, you can select the target enterprise project to view or operate the asset and detection information.
- Click the Agents tab.
- In the upper right corner of the page, click Install HSS Agent.
- Select ECS and click Configure Now.
- Select an installation method.
- Install Mode: GUI
- Server Authentication Mode: Account and password
- Scale: Single
- Select a server and click Next.
- Enter the account information and password as prompted.
- Confirm the information and click OK.
You can view the Agent Status column to check the agent installation progress. If the Agent Status is Online, the agent has been installed.
Using the Account and Password to Install the Agent on Muptiple Huawei Cloud Servers
- Log in to the management console.
- In the upper left corner of the page, select a region, click , and choose Security & Compliance > HSS.
- In the navigation pane, choose .
If your servers are managed by enterprise projects, you can select the target enterprise project to view or operate the asset and detection information.
- Click the Agents tab.
- In the upper right corner of the page, click Install HSS Agent.
- Select ECS and click Configure Now.
- Select an installation method.
- Install Mode: GUI
- Server Authentication Mode: Account and password
- Scale: Batch
- Upload the installation template.
- Click Download Template to download the batch installation template to your local PC.
Figure 3 Downloading the batch installation template
- Open the downloaded importTemplate.xlsx file, fill in server information as required, and save the file.
- Click Select File and upload the importTemplate.xlsx file.
HSS will automatically parse the file and identify the servers you entered. If the parsing fails, you can click View Failed Servers and check the failure cause.
- Confirm the information and click OK.
You can view the Agent Status column to check the agent installation progress. If the Agent Status is Online, the agent has been installed.
Using DEW to Install the Agent on One or More Huawei Cloud Servers
- Log in to the management console.
- In the upper left corner of the page, select a region, click , and choose Security & Compliance > HSS.
- In the navigation pane, choose .
If your servers are managed by enterprise projects, you can select the target enterprise project to view or operate the asset and detection information.
- Click the Agents tab.
- In the upper right corner of the page, click Install HSS Agent.
- Select ECS and click Configure Now.
- Select an installation method.
- Install Mode: GUI
- Server Authentication Mode: Key
- Key Source: DEW
- Select servers and click OK.
The list of available servers only shows the servers that have been bound to DEW.
Figure 4 Selecting servers
- Locate the row that contains the target server and check the agent installation progress in the Agent Status column.
If the Agent Status is Online, the agent has been installed.
Installing the Agent on One or More Huawei Cloud Servers Using a User-created Key (Linux Only)
- Log in to the management console.
- In the upper left corner of the page, select a region, click , and choose Security & Compliance > HSS.
- In the navigation pane, choose .
If your servers are managed by enterprise projects, you can select the target enterprise project to view or operate the asset and detection information.
- Click the Agents tab.
- In the upper right corner of the page, click Install HSS Agent.
- Select ECS and click Configure Now.
- Select an installation method.
- Install Mode: GUI
- Server Authentication Mode: Key
- Key Source: User-created key (Linux only)
- Upload the installation template.
- Click Download Template to download the batch installation template to your local PC.
Figure 5 Downloading the batch installation template
- Open the downloaded importTemplate.xlsx file, fill in server information as required, and save the file.
- Click Select File and upload the importTemplate.xlsx file.
HSS will automatically parse the file and identify the servers you entered. If the parsing fails, you can click View Failed Servers and check the failure cause.
- Confirm the information and click OK.
- Locate the row that contains the target server and check the agent installation progress in the Agent Status column.
If the Agent Status is Online, the agent has been installed.
Using Commands to Install the Agent on Huawei Cloud Servers
The HSS agent can be installed using commands. You can install the agent on different OSs. Various installation methods are as follows.
Using Commands to Install the Agent on a Single Huawei Cloud Linux Server
- Log in to the management console.
- In the upper left corner of the page, select a region, click , and choose Security & Compliance > HSS.
- In the navigation pane, choose .
If your servers are managed by enterprise projects, you can select the target enterprise project to view or operate the asset and detection information.
- Click the Agents tab.
- In the upper right corner of the page, click Install HSS Agent.
- Select ECS and click Configure Now.
- Select an installation method.
- Install Mode: Commands
- Server OS: Linux
- Scale: Single
- Install the agent as prompted.
- On the console page, click in the Install HSS Agent dialog box to copy the installation command.
Figure 6 Copying the installation command
- Log in to the server as the root user and paste the installation command.
If the command output shown in Figure 7 is displayed, the agent has been installed.
Figure 7 Agent installed
Using Commands to Install the Agent on Multiple Huawei Cloud Linux Servers
- Log in to the management console.
- In the upper left corner of the page, select a region, click , and choose Security & Compliance > HSS.
- In the navigation pane, choose .
If your servers are managed by enterprise projects, you can select the target enterprise project to view or operate the asset and detection information.
- Click the Agents tab.
- In the upper right corner of the page, click Install HSS Agent.
- Select ECS and click Configure Now.
- Select an installation method.
- Install Mode: Commands
- Server OS: Linux
- Scale: Batch
- Server Authentication Mode: Select Account and password or Key as needed.
- Install the agent as prompted.
Perform the following operations on any server.
- On the console, click linux-host-list.csv in the Install HSS Agent dialog box to download the template.
Figure 8 Downloading linux-host-list.csv
- Enter the server information based on the requirements in the linux-host-list.csv template and save the template.
Ensure that the entered server verification information is consistent with the verification mode selected in 7.
- Use the root account to remotely log in to any target server.
- Use the SSH client to upload the template file linux-host-list.csv to the /tmp directory on the server.
- Return to the HSS console and click to copy the installation command.
Figure 9 Copying the installation command
- Paste and run the installation command on the server to install the agent.
If the information shown in Figure 10 is displayed, the installation is complete.
Figure 10 Agent installed
Using the Script to Install the Agent on a Single Huawei Cloud Windows Server
- Log in to the management console.
- In the upper left corner of the page, select a region, click , and choose Security & Compliance > HSS.
- In the navigation pane, choose .
If your servers are managed by enterprise projects, you can select the target enterprise project to view or operate the asset and detection information.
- Click the Agents tab.
- In the upper right corner of the page, click Install HSS Agent.
- Select ECS and click Configure Now.
- Select an installation method.
- Install Mode: Commands
- Server OS: Windows
- Scale: Single
- Install the agent as prompted.
- On the console, click installAgent.ps1 in the Install HSS Agent dialog box to download the installation script.
Figure 11 Downloading installAgent.ps1
- Copy the installAgent.ps1 file to C:\Users\Administrator.
- Right-click installAgent.ps1 and choose Run with PowerShell.
- (Optional) In the dialog box that is displayed, enter Y to run the script to install the agent.
If no dialog box is displayed, skip this step.
Figure 12 Changing the execution policy
- After the execution, open the Task Manager and check whether hostguard.exe and hostwatch.exe exist. If they do, the agent has been installed.
Figure 13 Agent installed
Using the Script to Install the Agent on Multiple Huawei Cloud Windows Servers
- Log in to the management console.
- In the upper left corner of the page, select a region, click , and choose Security & Compliance > HSS.
- In the navigation pane, choose .
If your servers are managed by enterprise projects, you can select the target enterprise project to view or operate the asset and detection information.
- Click the Agents tab.
- In the upper right corner of the page, click Install HSS Agent.
- Select ECS and click Configure Now.
- Select an installation method.
- Install Mode: Commands
- Server OS: Windows
- Scale: Batch
- Install the agent as prompted.
- Perform the following operations on any server.
- To install the agent, the server where the script is executed needs to access the port 5985 on other servers. Modify the inbound rules of the security groups on those servers to allow such access, or HSS will temporarily modify their security group rules while installing the agent. After the agent is installed, the modified settings will be deleted.
- On the console, click windows-host-list.xlsx in the Install HSS Agent dialog box to download the template to the local PC.
Figure 14 Downloading windows-host-list.xlsx
- Enter server information based on the requirements in the windows-host-list.xlsx template and save it.
- Return to the HSS console and click BatchInstallAgent.ps1 to download the installation script.
Figure 15 Downloading BatchInstallAgent.ps1
- Copy the windows-host-list.xlsx and BatchInstallAgent.ps1 files to C:\Users\Administrator.
- Right-click BatchInstallAgent.ps1 and choose Run with PowerShell.
- (Optional) In the dialog box that is displayed, enter Y to run the script to install the agent.
If no dialog box is displayed, skip this step.
Figure 16 Changing the execution policy
- After the script is executed successfully, check whether the BatchInstallAgent.log file exists in C:\Users\Administrator.
If the BatchInstallAgent.log file exists, the agent has been installed.