How to change your server root password

It's wise to set a strong root password and change it periodically, or immediately if you suspect it's been exposed.

Via SSH

  1. Connect to your server as root over SSH.
  2. Run the command: passwd
  3. Enter the new password twice when prompted (it won't show as you type).

Via WHM

If your server runs cPanel/WHM, you can also change the root password under Server Configuration → Change Root Password.

Choose a strong password

  • At least 12 to 16 characters, mixing letters, numbers and symbols.
  • Don't reuse it anywhere else.
  • Store it in a password manager.

Forgotten the current root password and can't get in? Open a ticket and we'll help you reset it.

Was this answer helpful?

 Print this Article

Also Read

Getting started with your VPS or dedicated server

A VPS or dedicated server gives you more power and full control. Here's how to get going after...

How to reboot your server

Sometimes a reboot is the quickest fix for a server that's sluggish or unresponsive. You can do...

How to connect to your server via SSH

SSH gives you secure command-line access to your VPS or dedicated server — the most direct way to...

How to install a control panel on your server

A control panel like cPanel/WHM gives your server a friendly web interface for managing sites,...

How to set up a basic firewall

A firewall is your server's first line of defence, controlling which connections are allowed in....