How to Change Linux Account Password Through SSH: A Beginners’ Tutorial
Posted on In Linux, Network, TutorialPeople are sometimes given access to Linux/Unix and asked to change their initial passwords. But for beginners, changing a Linux/Unix password is not an easy task, especially when there is only SSH log on allowed to the Linux/Unix server. This post introduces how to change password of user USER on host HOST remotely using SSH.
Steps are as follows. Note: you will need to replace HOST and USER with the actual username and hostname you are using.
Table of Contents
Step 1. Log on the HOST as USER.
On Linux and Mac OS X, open a terminal and run
ssh USER@HOST
If it asks whether your are continuing connecting if you do this for the first time, you can enter “yes” to continue.
It will display
USER@HOST's password:
You will need to enter the password. You can’t see what you have entered here.
Step 2. Change the password
In side of the SSH login, run
passwd
It will display
Changing password for user USER.
Changing password for USER.
(current) UNIX password:
Enter your old password here. You can’t see what you have entred too.
It will then display
New password:
Enter new password. It will then display
Retype new password:
Enter new password again
If you see
passwd: all authentication tokens updated successfully.
or
passwd: password updated successfully.
Step3. Exit the SSH session
You can exit the SSH session by running
exit
Hey Eric,
Thanks for the tutorial on changing your Linux password. I appreciate the step-by-step instructions.
Dennis