If you did not set a logon password when you created an Elastic Compute Service (ECS) instance or if you forget the logon password of an ECS instance, you can use the password reset feature to change the password or set a logon password for the instance. This topic describes how to reset the logon password of an instance in the ECS console.
Background information
This topic focuses on how to reset the logon password of an instance in the ECS console. You can also use Cloud Assistant to reset the logon password of an instance, or connect to an instance and reset the logon password in the instance. The following table describes the comparison among the different methods.
Method | Need for instance restart | Need for instance logon | Instance status | Need for installation of Cloud Assistant Agent | |
Reset the logon password of an instance in the ECS console | Online Reset | No. | No. | Running | Yes. Linux: Cloud Assistant Agent 2.2.3.398 or later. Windows: Cloud Assistant Agent 2.1.3.398 or later. |
Offline Reset | Yes. | No. | Running or Stopped | No. | |
Change the logon password of an instance by using Cloud Assistant | No. | No. | Running | Yes. | |
Reset the logon password of an instance from within the instance | No. | Yes. You must connect to the instance, which is a complicated process. | Running | No. |
Procedure
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
Perform one of the following operations based on the number of instances whose logon passwords you want to reset at a time:
To reset the logon password of a single instance, find the instance and choose
in the Actions column.To reset the password of multiple instances at a time, select the instances and choose
in the lower part of the Instance page.
In the Reset Instance Password dialog box, configure the parameters and click Confirm. The following table describes the parameters.
Parameter
Description
Password Reset Method
Online Reset: After you reset the password of an instance online, you do not need to restart the instance. The new password is expected to take effect within 1 minute.
ImportantIn this method, Cloud Assistant is used to encrypt and transfer the password text to prevent decryption and ensure password security.
Offline Reset: After you reset the password of an instance offline, you must restart or start the instance for the new password to take effect.
If the instance is in the Running state, click Restart Now.
WarningThe restart operation stops the instance for a short period of time and may interrupt services that are running on the instance. We recommend that you restart instances during off-peak hours.
If the instance is in the Stopped state, the new password takes effect when you start the instance.
Logon Username
If you use the Online Reset method, you can change the username and password that you specified when you created the instance or after you created the instance.
If you use the Offline Reset method, you can change only the password of the logon username that you selected when you created the instance. The logon usernames that you can select vary based on the operating system of the instance.
Linux: root or ecs-user
Windows: Administrator
New Password and Confirm Password
The password must be 8 to 30 characters in length and contain at least three of the following character types:
Uppercase letters.
Lowercase letters.
Digits.
Special characters:
( ) ` ~ ! @ # $ % ^ & * - _ + = | { } [ ] : ; ' < > , . ? /
NoteFor Windows instances, logon passwords cannot start with a forward slash (/).
SSH Password Authentication
This parameter is available only when Password Reset Method is set to Online Reset.
Enable: If you enable SSH Password Authentication, the system automatically sets the
PasswordAuthentication
parameter in/etc/ssh/sshd_config
toyes
. This allows you to connect to the instance by using SSH and log on with the specified password.Retain Original Settings: If you select this option, you can change only the logon password of the instance.