If you do not specify a password when you create an ECS instance or forget the password of an instance, you can use Cloud Assistant to change the password of the instance. You can also reset the password in the console. However, the password changed by using Cloud Assistant takes effect without the need to restart the instance.
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region.
- Click the ID of the instance for which you want to run the Cloud Assistant command to go to the Instance Details page.
- Click the Remote Commands/Files tab and click Send Command.
- Configure parameters to change the instance password. The following table describes
Parameter Description Command Type The type of the command.
- For Linux instances, Shell is selected by default.
- For Windows instances, select Bat or PowerShell.
Retain Command Specifies whether to save the command.
After you save the command, you can use Cloud Assistant to view, modify, and run the command again.
Command Content The content of the command used to change the instance password. Run one of the following commands based on the operating system of your instance:
net user "Administrator" "<yourPassword>"
- Replace <yourPassword> with your new password.
- The password must be 8 to 30 characters in length. It must contain at least three of the following character types: uppercase letters, lowercase letters, digits, and special characters. The password of a Windows instance cannot start with a forward slash (/).
- Click Run.
If Success is displayed in the Command Output section, the password is changed. Then, you can check whether the new password can be used to log on to the instance. For more information about how to log on to the instance, see Guidelines on instance connection.