How can I log in as "root" on my dedicated server?
Print this Article
Comment on this Article
Last Updated:
October 19, 2009 2:51 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.
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.