This topic describes how to install the Security Center agent on multiple Alibaba Cloud ECS instances at the same time.
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.
- Download the Alibaba Cloud CLI tool.
- Run the
aliyun configcommand to configure your credentials in Alibaba Cloud CLI. If you do not configure your credentials, you cannot use Alibaba CLI to install Cloud Assistant.
- 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.
- 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=CloudAssistantStatuscommand to check whether the ECS instances already have Cloud Assistant installed. For more information, see Install the Cloud Assistant client.
- Log on to the Security Center console to install the Security Center agent on multiple ECS instances at the same time.