How do I change my server's root password? Print

  • 0

The quickest way is over SSH. Log in and run:

  1. passwd to change the current user's password, or sudo passwd root to set a new root password.
  2. Enter the new password twice when prompted.

Choose a long, random password. If you've lost root access entirely, use the VPS control panel in your client area, which usually has a reset root password option, or boot into the VNC console to reset it in single-user mode.

For stronger security, consider switching to SSH key authentication and disabling password logins afterward. On unmanaged VPS this is your responsibility; managed customers can open a ticket if you're locked out.


Was this answer helpful?

« Back