You can change the logon password of an instance without going to the console when you operate on the instance. The change takes effect immediately and you do not need to restart the instance. This topic describes how to change the logon password of an ECS Linux instance and an ECS Windows instance by connecting to the instance.

Change the logon password of a Linux instance

This topic takes a Linux instance that runs CentOS 7.6 as an example. Perform the following steps to change the logon password of a Linux instance:

  1. Log on to the target instance by using a remote connection. For information about the different methods that you can use to connect to a Linux instance, see Overview.
  2. Run the passwd username command (for example, passwd root).
  3. Enter a new password.
  4. Enter the new password again to confirm the password.

Change the logon password of a Windows instance

This topic uses a Windows instance that runs Windows Server 2008 as an example. Perform the following steps to change the logon password of a Windows instance:

  1. Log on to the target instance by using a remote connection. For information about the different methods that you can use to connect to a Windows instance, see Overview.
  2. Choose Start > Run, type compmgmt.msc, and press the Enter key.
  3. In the Computer Management window, choose System Tools > Local Users and Groups > Users.
  4. Right-click the username (for example, Administrator) for which you will change the password.
  5. Click Set Password.
  6. In the Set Password for Administrator dialog box, click Proceed. In the dialog box that appears, enter a new password in the New password and Confirm password fields, and then click OK.