This topic describes how to reset the logon password of an ECS instance. This topic is applicable to scenarios such as when you forget the password or when you did not set a password during instance creation.
Prerequisites
Background information
- After you reset the logon password of an instance that is in the Running state, you must restart the instance to make the new password take effect. When you restart the instance, your services may be affected. We recommend that you reset the logon password during off-peak hours to avoid service disruption.
- If the instance is a Linux instance, you can log on to the instance by using the password or the key pair. If you only use the password for authentication, this authentication method becomes invalid after you attach a key pair to your instance. If you want to use both methods to log on to the instance, you must reset its logon password.
- You can also change the logon password of an instance by using Cloud Assistant or change the logon password of an instance by connecting to the instance. The change takes effect immediately and you do not need to restart the instance. For more information, see Change the logon password of an instance or Change the logon password of an instance by connecting to the instance.