This article explains the method of changing the root password on a Linux Server using SSH.
How to Change Root Password Using SSH
To change root password using SSH, follow the steps below:
- SSH the server as Root user.
- Run the following command:
$ passwd root
- You will see the following output:
Changing password for user root. New password: (Enter Desired Password) Retype new password: (Retype Desired Password) passwd: all authentication tokens updated successfully.
Your password has now been changed and will be required to access the server as root user for any subsequent connections.
Conclusion
You now know how to change root password using SSH.

👀 Choose SSD-powered VPS servers for increased speed, power, and security! Now 50% off- starting from only $3.19/mo.