Skip to content
VDS · Machine access

Changing the root password

How to change the administrator password with a button in the control panel, how this differs from changing it inside the system, and what to do if login is completely lost.

Updated August 23, 2026

You change the root password in three cases: it leaked somewhere, the machine is being handed over to someone else, or it's simply time to refresh it. There are two ways to do it, and you should choose between them deliberately: one reboots the machine, the other doesn't.

Via the control panel: Access → Password → Change password

Open /hosting/vds/m/<id>, go to the “Access” tab, the “Password” subsection, and click “Change password”. The panel generates a new password itself, shows it on screen and remembers it: from then on you can reveal it with the “Show password” button on the same tab. You can't set your own password here.

Changing the password through the panel reboots a running machine. The password is applied by the initial setup at boot; otherwise it simply wouldn't take effect. Anything that doesn't survive a restart — connections, unsaved data inside applications, services without autostart — will be cut off. For a production machine, pick your timing.

This path is for when you don't have the password at all: it requires neither a login to the system nor a working network inside it. The account whose password is changed is the same one issued with your order: root on Linux, Administrator on Windows Server.

From inside the system: no reboot

If you can log in and can't interrupt the machine, change the password from inside. Connect over SSH and run:

passwd

The system asks for the new password twice; characters aren't shown as you type. You can generate a ready-made random password right on the machine:

openssl rand -base64 24

Save it to your password manager before you press Enter.

Changing an individual user's password works the same way, with the name specified:

passwd artem

The panel keeps showing the old password: it knows nothing about passwd inside the system. After a change from inside, the displayed value no longer works; the current one is stored only with you. More: root password.

If SSH is unavailable but the system boots

Use the text console or the machine screen on the panel's “Console” tab: they work independently of the network and firewall rules. Log in as root and run passwd.

If access is lost completely

First try the “Change password” button on the “Access” tab: it requires no access inside and solves the problem with a single reboot. You need the recovery disk only if that doesn't help either — for example, the system won't boot, or the password inside is overridden in a way that the initial setup doesn't overwrite.

  1. On the panel's “Access” tab, switch the boot mode to the SystemRescue recovery disk.
  2. Reboot the machine and open the console. Root login without a password.
  3. The machine's disk appears as /dev/sda. Mount the root partition and change the password:
mkdir -p /mnt/vds
mount /dev/sda1 /mnt/vds
chroot /mnt/vds
passwd
exit
umount /mnt/vds
  1. Switch the boot mode back to normal and reboot the machine.

If there are several partitions and you're not sure which one is the root, check the layout:

lsblk

The root one is the partition where you see the etc, var, usr directories after mounting.

Common mistakes

MistakeWhat happens
You forgot to switch the boot mode back to normalThe machine boots into SystemRescue again instead of your system
You changed the password, but SSH login still failssshd_config has PasswordAuthentication no — log in with a key or through the panel console
You mounted the wrong partitionpasswd changes the password inside the recovery disk, not your system. Check lsblk and the directory contents
The new password isn't written down anywhereIn a week you'll be back here. Password manager first, then the change

After the change

  • Verify the login in a new terminal window without closing the current one.
  • If you changed the password because of a leak, also check for foreign keys:
cat /root/.ssh/authorized_keys
last -n 20
  • Make sure the key list on the “Access” tab contains only your keys — it's replaced as a whole, and you remove extras by submitting a set without them. Keep in mind that saving keys also reboots a running machine: if you've just been through a reboot because of the password change, deal with the keys in the same session.