This topic describes how to reset the logon password of one or more instances.

Limits

  • After you reset the logon password of a running instance, you must restart the instance so that the new password can take effect. Restarting the instance may impact your services. We recommend that you reset the logon password and restart your instance during off-peak business hours to avoid service disruption.
  • If your instance uses a password for authentication, the password authentication automatically becomes invalid after you attach a key pair to your instance. However, if you reset the password of your instance after you attach a key pair to the instance, you can log on to the instance by using the password or the key pair.

Prerequisites

The instance must be in a stable status, such as Stopped and Running. For more information, see ECS instance life cycle.

Procedure

To reset the password of one or multiple ECS instances, follow these steps:

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Instances.
  3. In the top navigation bar, select a region.
  4. Select one or more target instances as follows:
    • To reset the password of one instance, find the target instance, and then choose More > Password/Key Pair > Reset Password in the Actions column.
      reset-pwd1
    • To reset the password of multiple instances, select the target instances, and then click Reset Password under the instance list.
      reset-pwd-for-multiple-instance
  5. Specify a new valid password, and then click OK.
    reset-pwd
  6. Perform the following operations as needed:

You can also use Alibaba Cloud CLI, OpenAPI Explorer, or Alibaba Cloud SDK to call the ModifyInstanceAttribute API action to reset the logon password.

What to do next

You can change the password of an ECS instance and then restart the instance in the ECS console to make the new password take effect.