This topic describes how to install the Security Center agent on multiple Elastic Compute Service (ECS) instances at a time.
You must use the AccessKey pair of an Alibaba Cloud account that has the permissions to manage ECS instances. Only accounts with these permissions are allowed to install Cloud Assistant on ECS instances. Cloud Assistant is used to install the Security Center agent on multiple ECS instances at a time.
- Download Alibaba Cloud CLI.
- 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 a 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 in sequence, 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 have Cloud Assistant installed. For more information, see Install the Cloud Assistant client.
- Log on to the Security Center console. In the left-side navigation pane, click Settings. On the Agent tab of the Settings page, install the Security Center agent on multiple ECS instances at a time.