• sales@toshost.com
  • 880 197 777 1867

Change Linux Server Root Password

 

When a new server come online and if you get it from us or any provider they give you a root access and When you start using your server then one of the first things you'll notice if you have ssh running and exposed to the outside world is that you'll probably log attempts by hackers to guess your username/password. Typically a hacker will scan for port 22 (the default port on which ssh listens) to find machines with ssh running, and then attempt a brute-force attack against it. With strong passwords in place, hopefully any attack will be logged and noticed before it can succeed. Now we disscuss how to change password via SSH in Linux/Centos 

 First, you need login SSH to your Linux server, then use command passwd to change password. below example is change root password for a Centos:

-bash-3.2# su - root  - you don't need to do this if you already login ssh as root
[root @ ComfortVPS.com ~]# passwd root - usage: passwd <accountName> , passwd root means change password for accountname root
Changing password for user root.
New UNIX password:   (You should type your new password here)
Retype new UNIX password:   (You should retype your new password again)
passwd: all authentication tokens updated successfully.

Done, you have successfully changed your password!

 

SSH Change password Failed example:

[root @ toshost.com ~]# passwd
Changing password for user root.
New UNIX password: 
BAD PASSWORD: it is WAY too short
Retype new UNIX password: 
Sorry, passwords do not match.
New UNIX password: 
Retype new UNIX password: 
Sorry, passwords do not match.
New UNIX password: 
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password: 
Sorry, passwords do not match.
passwd: Authentication information cannot be recovered

 

Hopefully you already use strong passwords, but if you are not then try to choose passwords that contains:

  • Minimum of 8 characters
  • Mix of upper and lower case letters
  • Mix of letters and numbers
  • Non alphanumeric characters (e.g. special characters such as ! " £ $ % ^ etc)

If you are a TOSHOST client and if you forgot your root password of VPS or Dedicated server then cosider to open a support ticket and wait few moment for get your reply. 

  • cart
  • cart
  • cart
  • cart
  • cart
  • cart
TOSHOST

TOSHOST