How to Change the Root Password on Your Linux Root Server / vServer ​
Using the passwd command you can change the password of your current user — or, as root, the password of any other user — directly on the server.
Log in as root ​
Connect via SSH
Connect to your server via SSH:bashssh root@YOUR_SERVER_IP
Change your own password ​
Run the following command:
bash
passwdYou will be prompted to:
- Enter your current password (non-root users only).
- Enter your new password.
- Re-enter the new password to confirm.
Note
For security reasons nothing is displayed while typing — not even asterisks. Type the password blindly and confirm with Enter.
Change another user's password ​
As root you can set the password of any other user without knowing the old one:
bash
passwd USERNAMEExample:
bash
passwd myuserTips for strong passwords ​
- At least 16 characters.
- Mix of upper and lower case, numbers and special characters.
- No dictionary words and no personal data.
- Use a unique password per service — ideally managed in a password manager.
Tip
For even more security, use SSH keys instead of passwords. The full guide is available at Secure SSH Access.