VPS Linux

How to Change Your VPS's Root Password

Change your Winheberg VPS's root password from your client area or via SSH with the passwd command.

July 24, 2026 Winheberg
DocumentationVPS LinuxHow to Change Your VPS's Root Password

Context

You just received your Linux VPS at Winheberg with a root password automatically generated by our system? The very first recommended step after connecting is to change this password to one only you know. This prevents anyone who may have intercepted the delivery email from accessing your server.

Two methods are available, from your client area without going through SSH, or directly from the command line on your server. This guide covers both, and works on every distribution we offer, namely Debian 11/12/13, Ubuntu 23.10/24.04/25.04, AlmaLinux 9/10, Rocky Linux 9/10, Fedora 41/42, and Alpine Linux 3.22.

Why change the root password?

Several reasons make this step important. First, the initial password was sent to you by email, a channel that can be intercepted or accessed by others with access to your inbox. Second, an automatically generated password isn't always easy to memorize, which often leads to writing it down in plain text somewhere, which isn't ideal. Finally, by choosing a strong, unique password yourself, you stay in control of your server's security.

If you plan to set up SSH key authentication (recommended), changing the password is still useful since it will be asked for sudo commands or to recover access through the rescue console.

Method 1. From your client area

This is the simplest method, it requires no SSH connection at all.

  1. Log in to your Winheberg client area
  2. Go to the relevant VPS's management page
  3. Find the Change Password action
  4. Follow the on-screen instructions to set your new root password

The new password is applied directly by our system, there's nothing else for you to do on your end.

This method is especially handy if you're locked out of your server (forgotten password, SSH connection not working) since it doesn't depend on a working SSH access.

Method 2. Via SSH with the passwd command

If you'd rather change the password directly from the server, or if you also need to change another user's password, here's the command-line procedure.

1. Connect to your VPS via SSH

Connect to your server via SSH with the initial password received by email.

ssh root@YOUR_VPS_IP

Your server's IP address was sent to you in the delivery email from our team when you ordered, or in the IP Address section of your client area. Replace YOUR_VPS_IP with that address (for example ssh root@51.158.xx.xx).

2. Change the root password

Once connected, simply run the following command.

passwd

The system will ask you to enter the new password twice.

New password:
Retype new password:
passwd: password updated successfully

Nothing shows up on screen while you type your password. That's normal, it's a protection against prying eyes. Type your password then press Enter.

If both entries match, the password is changed immediately. No reconnection is needed for the change to take effect.

3. Change another user's password

The passwd command can also change the password of a user other than root. Just specify their name at the end.

passwd username

You need to be logged in as root (or use sudo) to change another account's password. This command is useful, for example, if you created a secondary user and want to set or reset their password.

Choosing a strong password

A root password is your server's key. It should be as strong as possible. To be effective, it should contain at least 16 characters, mix uppercase, lowercase, digits, and special characters, and not resemble any dictionary word or personal information (birth date, first name, etc.).

Examples of strong passwords.

g7$Tk!Bn92#vXr@P
M0nVps-Secur1se!2026
TxX9!pq@2KvR^bF7

To avoid having to memorize complex passwords, the ideal solution is to use a password manager like Bitwarden, Vaultwarden, KeePass, or 1Password. You'll only need to remember one master password, and the manager will store all the others securely.

If you really want to secure your VPS, disable password-based login entirely and switch to SSH key authentication. Our guide on securing a VPS covers the full procedure.

If you run into trouble

Here are the most common errors you might run into.

❌ BAD PASSWORD, The password is too short

Your password is too short or too simple. Add more characters and mix uppercase, digits, and special characters. As root, you can force a weak password, but it's strongly discouraged.

❌ passwd, Authentication token manipulation error

A rare error indicating a system file issue. Check that /etc/passwd and /etc/shadow aren't corrupted, and that your disk isn't full with df -h.

❌ I forgot my new password

Don't panic. Use the Change Password action from your client area (Method 1), which doesn't require SSH access. You can also go through your VPS's rescue console (rescue mode / KVM console) and use passwd to set a new password. If you're not sure how, contact our support.

❌ On Alpine, the passwd command isn't found

This is very rare, but if Alpine is installed in a minimal version, the shadow package may not be present. Install it with this command.

apk add shadow

Need help?

If you run into an issue changing your root password, our team is here. Open a ticket in the Technical department from your client area and fill in the Related Product field with the VPS in question.

Your VPS is now protected with a password only you know 🔐

Need a VPS Linux server?

Discover our offers tailored to your needs and get started now.

View offers