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.
Prerequisites
The instance whose logon password you want to reset is in the Running or Stopped state.
Methods
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 compares the different methods that can be used to reset the logon password of an instance.
Method | Impact | References |
Reset the logon password of an instance in the ECS console |
| Procedure section of this topic |
Reset the logon password of an instance by using Cloud Assistant |
| |
Connect to an instance and reset its logon password in the instance |
| Change the logon password of an instance by connecting to the instance |
Considerations
When you reset the logon password of an instance in the ECS console, take note of the following items:
Select an appropriate period of time to reset the password. If the instance is in the Running state, you must restart the instance after the password is reset for the new password to take effect.
Warning The 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.The key pair authentication method overrides the username-password authentication method. Linux instances can be logged on to by using key pairs or by using usernames and passwords. If you bind a key pair to a Linux instance that already has a logon password, the password becomes invalid and you can only use the key pair to log on to the instance. If you want to use a password to log on to the Linux instance, you must reset the logon password.
Procedure
- Log on to the ECS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region.
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 click Reset Instance Password below the instance list.
In the Reset Instance Password dialog box, enter and confirm a new password and then click Save Password.
Decide whether to start or restart the instance for the new password to take effect based on the status of the instance.
If the instance is in the Running state, click Restart Now.
If the instance is in the Stopped state, the new password takes effect when you start the instance.