You can send remote commands in the Elastic Compute Service (ECS) console to quickly perform routine O&M operations on ECS instances. These operations include batch installing or uninstalling software, resetting user passwords, and automating O&M scripts. This topic describes how to send commands to one or more ECS instances in the ECS console.
Prerequisites
The instances to which you want to send commands are in the Running state.
Cloud Assistant Agent is running on the instances. For more information, see Start, stop, or uninstall Cloud Assistant Agent.
Procedure
Cloud Assistant Agent is required when you send remote commands, and the remote commands count against the quota of Cloud Assistant commands. For information about the usage notes and limits of Cloud Assistant Agent, see Overview.
You can also send and run commands on the Cloud Assistant page. For more information, see Create and run a command.
Go to ECS console - Instances.
In the top navigation bar, select the region and resource group of the resource that you want to manage.
Click the ID of the ECS instance that you want to manage to go to the instance details page. In the upper-right corner of the page, click All Actions. In the pane that appears, search for and click Send Command.
In the dialog box that appears, complete the command settings and click the Run button.
NoteYou can perform batch operations on the Instance page to send a command to multiple Linux or Windows instances at a time.
Parameter
Description
Example
Command Type
For Linux instances, Shell is selected by default. You can also select Python or Perl.
For Windows instances, select Bat or PowerShell.
Shell
Timeout Period(s)
The timeout period for the one-time execution of the command. After the timeout period ends, the sending process is forcefully terminated.
Valid values: 10 to 86400.
Unit: seconds.
60
Command Content
The command output must be returned in a single execution. You cannot interact with the command output.
For information about a simple shell command, see View the system configurations of ECS instances.
NoteAfter a command is run, you can enter another command in the Command Content code editor to run on the selected instances.
/
References
You can batch run Cloud Assistant commands or upload files on ECS instances to which specific tags are added to maintain the instances. For more information, see Control the executions of Cloud Assistant commands based on tags.
You can use Cloud Assistant to maintain ECS instances without passwords or logons, eliminating the need for jump servers. For more information, see Overview.