If you come across a situation where you are unable to login as root to your Linux Cloud Server through a standard ssh connection, but you can login with the console in the Control Panel, a likely cause is that remote login as the user: root has been disabled. Control of the PermitRootLogin function is managed in your /etc/ssh/sshd_config openssh config file.
You may have done this inadvertently or by following someone else's instructions, as this is a common security precaution. To remedy this issue, you will have to connect to your Cloud Server through a console session as the user: root and follow the steps below:
vi /etc/ssh/sshd_config
PermitRootLogin no
PermitRootLogin yes
Next, save and close the file by:
pressing esc and hitting the colon : then typing x and hitting enter.
DenyUsers root user2 user3
(It's possible this line may not exist, or that it will have actual user names in it)
DenyUsers user2 user3
Save the edit and exit insert mode by pressing esc and esc.
Next, save and close the file by:
pressing esc and hitting the colon : then typing x and hitting enter.
(Red Hat, CentOS, Fedora, and openSUSE systems):
/etc/init.d/sshd restart
(Ubuntu and Debian based systems):
/etc/init.d/ssh restart
If in fact the issue you were experiencing was that PermitRootLogin was disabled, you should now be able to establish a remote ssh connection.
© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

1 Comment
BSD
Add new comment