Forgot your server password: reset root or Administrator
You can get back in without losing data: change the password from the provider's panel if it supports that, or boot a rescue system and change it by hand. Do not reinstall before trying both.
Last updated:
The easy way: from the provider's panel
Many panels change the password directly, but this usually needs a running server with a guest agent installed. If it fails, move on to the rescue system.
On Linux: through the rescue system
A rescue system is a small system that boots instead of yours so you can reach its files. Turn it on, restart the server, log in with the details it gives you, find your system's partition and change the password from inside it.
$ lsblk $ mount /dev/vda1 /mnt $ chroot /mnt $ passwd root $ exit $ umount /mnt
The partition name differs between servers: it may be vda1, vda2 or sda1. From the lsblk output, pick the largest one that holds your system. When you finish, turn the rescue system off and restart the server.
On Windows
If you have a session open on the server console, change it from an administrator command prompt. If you cannot log in there is no simple safe way, so contact your provider's support before reinstalling.
$ net user Administrator *After you are back in
Use a long, unique password kept in a password manager, and add an SSH key so you do not rely on the password alone.

