How can I log in as 'root' on my dedicated server?
Print this Article
Comment on this Article
Last Updated:
April 23, 2010 3:50 PM
By default, you cannot log in to your dedicated server remotely using "root." If you need "root" access on your dedicated server, use the su - command once you have logged in with your User ID. Alternatively, you can modify the sshd_config file to permit root access.
Some of the information in this article is advanced material we make available as a courtesy. Please be advised that you are responsible for properly following the procedures below. Customer Support cannot assist with these topics.
To Use the su - Command
The su (short for substitute user) command makes it possible to log in as root temporarily while you are logged in with your normal User ID.
- Log in to your dedicated server with your regular user account.
- Type:
su -
- Enter your root password. Your root password is the same as the password for your normal User ID.
To Modify the sshd_config File to Permit Root Access
- Log in to your dedicated server and switch to root using the su - command.
- Edit the following file:
/etc/ssh/sshd_config. - Open the file in an editor and locate the following line:
PermitRootLogin no. - Update the line to read:
PermitRootLogin yes. - Save the file and restart SSH by typing:
/etc/init.d/sshd restart.