In this tutorial, we will explain the procedure to change password in Linux via SSH.

#1. How to Change password as user via SSH?

  • Login to SSH with the required credentials.
  • Execute the below given command.
passwd
  • It will ask you to enter your current password. 
  • Then prompts for New Password. Create a new password and re-type to confirm.
You will receive a confirmation message.

#2. How to Change Password as root user?

  • Login to SSH with root credentials.
  • Execute the below given command.
passwd [username]

*Replace the [username] with the cPanel username of which you want to change the password.

  • Create New Password and re-type to confirm it. Then you will receive a confirmation message.
password updated successfully

#3. How to Manage Force Password Change via SSH?

  • Execute the following command from root terminal.
passwd --expire [username]

*Replace [username] with cPanel username of which you want force password change.

  • You will receive the confirmation message as:
Expiring password for user abc.
passwd: Success
That's it !
Check the blog to get in detailed procedure to change password in Linux.
Was this answer helpful? 0 Users Found This Useful (0 Votes)