This topic describes how to install the Security Center agent on multiple Alibaba Cloud ECS instances at the same time.

Background information

You must use the AccessKey pair of an account that has the permission to manage ECS instances. Only accounts with this permission are allowed to install Cloud Assistant on ECS instances. Cloud Assistant is used to install the Security Center agent on multiple ECS instances at the same time.

Procedure

  1. Download the Alibaba Cloud CLI tool.
  2. Run the aliyun config command to configure your credentials in Alibaba Cloud CLI. If you do not configure your credentials, you cannot use Alibaba CLI to install Cloud Assistant.Configure user credentials
  3. Run the following commands to query the IDs and region IDs of the ECS instances on which you want to install Cloud Assistant.
    aliyun ecs DescribeRegions   #Query the region IDs.
    aliyun ecs DescribeInstances --RegionId [cn-hongkong]   #Query instance IDs in the specified region. This command queries instance IDs for only one region at each run. 
    Query instance IDs
  4. Run the following command to install Cloud Assistant. Alibaba Cloud CLI allows you to install Cloud Assistant on multiple ECS instances at the same time.
    aliyun ecs InstallCloudAssistant --RegionId [TheRegionId] --InstanceId.N [i-bp1g6zv0ce8ogXXXXXXp]  #To install Cloud Assistant on multiple ECS instances, replace the N variable with the number of target ECS instances, and i-bp1g6zv0ce8ogXXXXXXp with the instance IDs obtained in step 3.
    Note You can run the aliyun ecs DescribeCloudAssistantStatus --RegionId TheRegionId --InstanceId.1 i-bp1g6zv0ce8ogXXXXXXp --output cols=CloudAssistantStatus command to check whether the ECS instances already have Cloud Assistant installed. For more information, see Install the Cloud Assistant client.
  5. Log on to the Security Center console to install the Security Center agent on multiple ECS instances at the same time.Install the Security Center agent on multiple ECS instances
Note Instances that already have the Security Center agent installed are not listed on the Agent page. You can navigate to the Assets > Server page to verify that the Agent status of the instances is Enabled.

Related topics

Identify why the agent is offline

Install the Security Center agent

Install the agent on servers in private networks