How to change root password on centos using ssh

In this article, we will learn how to change root password account on CentOS operating system. 

The root account is a special user account on Linux that has access to all files, all commands and that can pretty much do anything on a Linux server. Therefore root account is the highest authority account on the system. It has control over everything, can delete and modify anything, and has permission to run any program.


  1. You should have a VPS or Dedicated Server with Linux CentOS 7 installed.
  2. You should have access to your server or to your client control panel to open a KVM console.

Steps to Change Linux/Centos root password via SSH

First login to your server using SSH connection , then simply you can run the following commands to change your root or current password as bellow:
Then you will prompt to Type your new password and , Retype your new password as bellow:
					Changing password for user root.
New password:
Retype New password:

As a result your new password should work fine.

Recommendation : you should set a strong password for the root account. It should be at least 10 characters, with special characters, uppercase and lowercase letters.Also, it should not contain any words that are easily found in a dictionary.

Share on facebook
Share on twitter
Share on linkedin
Share on telegram
Share on whatsapp

Related Posts