[EN] How to enable access root for Cloud Server

First time using Cloud Server, you can’t access with Root.

After creating a Cloud Server, the system will send an email informing Username and Password to login for the first time.

You need to access with Username and Password we’re informing via Email first and set the Root access before using it.

1. After SSH Login with Username and Password, the system will ask you to enter the current Password and set a new password. If you already set a new password, skip to step 2.

After set the new Password, it will auto logout. You can SSH login again with Username and New Password

2. After SSH Login again, you can access the user Root with the command

sudo -i

3. Set Root Password by running the command.


4. To enable Root Access, you need to edit the file /etc/ssh/sshd_config 

nano /etc/ssh/sshd_config

5. Find the Authentication section in the file.

6. Remove “#” in front of PermitRootLogin line and change prohibit-password to be yes

PermitRootLogin yes

Save the updated /etc/ssh/sshd_config file.

7. Restart SSH Server

systemctl restart sshd

Now you can SSH Login with user root.

Was this article helpful?

Related Articles