Change a root password of a Linux/Unix OS/Server Via SSH

Edited by Mark Joel Cristobal, Charmed, Anonymous

Firewall protection from intruder is important but in very common way of giving some protection with a certain software in Linux is the Root/user password access in which this is very important and essential to limit the intruder in access)

Was this helpful? Yes | No | I need help



  1. 1
    The first Step is to login to the server and run the terminal or if you are using a Windows OS all you need to do is to use the Putty that will act as a terminal and connect with the SSH port which is 22
    Was this step helpful? Yes | No | I need help

  2. 2
    after you log on the server's SSH(shell) then type the bash/unix command "passwd" without the double quotation then enter and it will prompt you to enter a complex password, meaning with a combination of alpha numeric key and you're done.
    if you want to change the password of a root user also then type "passwd username" without the double quotation the user pertains to the username.
    Was this step helpful? Yes | No | I need help

  3. 3
    To test if it works then close the terminal then relogin again with the password that you used to changed.
    Was this step helpful? Yes | No | I need help


Tips Tricks & Warnings

  • Be sure that you that you will be able to remember the password the newly password that you used.
  • write it manually to a piece of paper just in case that you are not familiar with the password.
  • If you have problems with any of these steps, ask a question for more help, or post in the comments section below.


VisiHow welcomes all comments. If you do not want to be anonymous, register or log in. It is free.

Premier Author
Articles Started
Article Edits
2,800 Points
Mjoe14 is a premier author with VisiHow. Mjoe14 has achieved the level of "Corporal" with 2,800 points. Mjoe14 has started articles and made article edits. people have read Mjoe14's article contributions.
Ask Mjoe14
Mjoe14: Hi, my name is Mjoe14.
Mjoe14: Can I help you with your problem about "Change a root password of a Linux/Unix OS/Server Via SSH"?

Article Info

Categories : Linux

Recent edits by: Charmed, Mark Joel Cristobal

Share this Article:

Thanks to all authors for creating a page that has been read 791 times.


Thank Our Volunteer Authors.

Would you like to give back to the community by fixing a spelling mistake? Yes | No