You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Managing commands
Managing public commands
Copy page
Download PDF
Managing public commands
Public commands are preset by the cloud assistant based on common O&M operations, such as "Change Linux instance password" and "Install Cloud Monitor Agent on Linux instance". You can use public commands to quickly create O&M tasks and complete common O&M operations.​
Considerations​
You can not add, edit, or delete public commands.​
Procedure​
View public command details​
Before using public commands, you can view command information, such as the execution path, execution user, and specific content. This allows you to confirm whether the target public command meets your O&M requirements.​
  1. Log in to the ECS console. ​
  1. In the left-side navigation pane, select "Maintenance & Monitoring > Cloud Assistant" and then select the "Public commands" tab. ​
  1. In the top menu bar, select the region where your business is located. ​
  1. Select the target command to view and then click the "View details" button.​
  1. On the pop-up command details page, you can view the basic information of the command (such as the command name, execution path, execution user, and timeout period), the command content, and command parameters.​
"Argument" information is displayed only when the command supports custom parameters.​
Create jobs​
If there are public commands that meet your O&M requirements, you can directly and quickly create jobs and perform O&M operations on the Public commands page for execution. For detailed job configurations​, refer to Creating jobs.​
Clone public commands into custom commands​
You can use the public command cloning feature to make personalized changes based on public commands. With this feature, you can clone public commands and use the cloned commands as custom commands.​
  1. Log in to the ECS console. ​
  1. In the left-side navigation pane, select "Maintenance & Monitoring > Cloud Assistant" and then select the "Public commands" tab. ​
  1. In the top menu bar, select the region where your business is located. ​
  1. Select the target command to clone and click the "Clone" button.​
  1. Change the information of the following configurations as needed.​
  • ​
    Parameter​​
    Description​
    Sample value​
    Basic information​
    ​
    ​
    Command name​
    Set the command name.​
    Change login password​
    Command source​
    Select the command type. For the current version, Linux Shell, Python, Windows PowerShell, and Windows Bat can be selected.​
    Linux Shell​
    Command contents​
    Write the specific command content based on the requirements.​
    tip​
    • The size of the command content must not exceed 16 KB.​
    -​
    Use argument​
    You can use custom parameters in the command based on your requirements. After you enable this option, custom parameters in the command content are displayed automatically. For more details on custom parameters, refer to Custom parameter descriptions.​
    -​
    Execute configuration​
    ​
    ​
    Execution path​
    Enters the command execution path.​
    tip​
    • The default command execution path in Linux operating systems is /home.​
    • The default command execution path in Windows operating systems is C:/Windows/System32.​
    /root​
    Default executing user​
    You can specify an existing user in the target instance to execute commands. We recommend that you avoid using the Root or System user to reduce security risks.​
    user1​
    Login password​
    Enter the login password for the execution user.​
    tip​
    When the command type is Windows PowerShell or Windows Bat, and the execution user is not "system", you are required to enter the login password.​
    ​
    Timeout​
    Sets the timeout period for command execution on each instance. If the command execution times out, the cloud assistant will mark the task as failed on the corresponding instance.​
    tip​
    The default timeout period varies by commands, and you can manually adjust it within the range of 30 seconds to 24:00:00.​
    -​
    Advanced configuration​
    ​
    ​
    Project​
    Project: You can add the cloud assistant to the project and manage it by project dimension, which helps maintain resource independence and ensure data security. For more project details, refer to Project management.​
    default​
    Tag​
    A tag is a key-value pair used to identify cloud resources. Tags help you categorize resources based on different dimensions, such as purpose, owner, or environment. This allows you to search and aggregate your resources. For more information about tags, refer to Tags.​
    Key1:Value1​
    ​
  1. Click the "Confirm" button to clone.​
  1. After the command is cloned, you are automatically redirected to the Custom commands page. Here, you can create jobs, clone commands, and perform other operations. For details, refer to Custom commands.​
Public command overview​
The following table shows public commands currently available and brief usage instructions.​
tip​
If preset public commands can not meet your O&M requirements, you can create custom commands. For details, refer to Creating custom commands.​
​
Command name​
Type​
Parameter description​
Description​
Update software source key​
Linux Shell​
-​
Used to update Mirror source key information. For more details, see How to fix expired software repository keys?.​
Install Cloud Monitor Agent on Linux instance​
Linux Shell​
-​
This command is used to install Cloud Monitor plugins on Linux instances. For more details about Cloud Monitor, refer to What is Cloud Monitor.​
Change Linux instance password​
Linux Shell​
  • username: Required. The username.​
  • password: Required. The login password.​
tip​
You can only change login passwords corresponding to existing usernames for instances.​
This command is used to change login usernames and passwords of Linux instances.​
Add SSH public key to Linux instance​
Linux Shell​
ssh_public_key: Required. The public key of the SSH key pair.​
This command is used to add a public key from a key pair to a Linux instance for the SSH login.​
Replace SSH public key for Linux instance​
Linux Shell​
  • username: Required. The username. The default value is root.​
  • ssh_public_key: Required. The public key of the SSH key pair.​
This command is used to replace the public key from a key pair for a Linux instance for the SSH login.​
Script to diagnose and troubleshoot RDMA failure​
Python​
-​
This command is used to troubleshoot RDMA failures on HPC GPU-optimized instances.​
tip​
Only HPC-optimized instances support this feature. For purchase details, refer to Purchasing HPC-optimized instances.​
Collect Linux instance status​
Linux Shell​
-​
This command is used to collect status information of a Linux instance, including OS version, network information, memory usage, GPU usage, cloud-init information, and SOS information. Finally, the command generates the status information as a compressed package in the /tmp directory for easy analysis afterwards.​
Upload file to Windows instance​
PowerShell​
  • fileName: Required. The file name.​
  • targetDir: Required. The target directory for receiving files.​
  • overWrite: Required. Indicates whether to override existing same-name files in the target directory. Supported:​
  • false: no override.​
  • true: override.​
This command is used to send local files to multiple Windows instances in a batch.​
tip​
  • The file size must not exceed 16 KB (16,384 bytes).​
  • Currently, this command is supported in the China (Guangzhou) region only. If you need to trial it in other regions, please contact the account manager to apply.​
Change Windows instance password​
PowerShell​
  • username: Required. The username.​
  • password: Required. The login password.​
tip​
You can only change login passwords corresponding to existing usernames for instances.​
This command is used to change login usernames and passwords of Windows instances.​
Upgrade cloud assistant Agent​
Linux Shell​
-​
This command is used to upgrade the cloud assistant Agent.​
tip​
Currently, this command is supported in the China (Beijing) region only. If you need to trial it in other regions, please contact the account manager to apply.​
Reset password online​
Linux Shell​
  • Key_Pair_ID: Required. The key pair ID.​
  • Encrypted_PassWord: Required. The encrypted password.​
  • User_Name: Required. The username.​
  • Open_Passwd_Auth: Optional. Indicates whether to enable password authentication for SSH login.​
  • Yes (default): Indicates that password authentication is enabled for SSH login.​
  • No: Indicates that password authentication is disabled for SSH login.​
This command is used to reset Linux instance passwords online.​
Install ModelArk privatized license client​
Linux Shell​
  • VERSION: Required. The version number of the API.​
  • ACCESS_KEY: Required. The identity credential for API access (the ID of the access key). It is used together with SECRET_KEY as a credential pair for authentication. Only authorized holders can call the API.​
  • SECRET_KEY: Required. The identity credential secret key for API access. It is used together with ACCESS_KEY as a credential pair. Only authorized holders can call the API.​
tip​
Keep your SECRET_KEY secure. Do not share it with unauthorized parties or store it in plaintext in configuration files, logs, or similar locations, to prevent unauthorized use of the API if the key is compromised.​
Used to install and deploy the ModelArk privatized license client (Agent).​
tip​
Currently, this command is supported in the China (Beijing) region only. If you need to trial it in other regions, please contact the account manager to apply.​
Uninstall ModelArk privatized license client​
Linux Shell​
-​
Used to uninstall the ModelArk privatized license client (Agent).​
tip​
Currently, this command is supported in the China (Beijing) region only. If you need to trial it in other regions, please contact the account manager to apply.​
​
​
Last updated: 2026.06.25 16:23:41