Enable root access to Ubuntu via ssh
This is a well known security risk: root is a well known username and if somebody gets your root password, they can commit all sorts of (automated, even) havoc on your system.
But some applications simply need root access (e.g. rsback). In such cases, here’s how you ensure it is turned on. (This assumes that you already have OpenSSH client and server installed). These instructions are summarised from the thread at http://ubuntuforums.org/showthread.php?t=479343 :
- Ensure that the password is set (on Ubuntu systems the default is that it is not set):
sudo passwd root
- Check that
/etc/ssh/sshd
is set to allow root access (on Ubuntu systems, the default for this is “yes”):PermitRootLogin
should have a value of “yes”
That’s it. The first step is the one I keep forgetting. In Ubuntu, the root doesn’t have a password in the standard installation.
Comment [2]
Steve Krzysiak (Mon Dec 8, 2008 (08:39:46)) [PermLink]: Thanks for posting this, it helped me because everyone mentions to set the PermitRootLogin flag, yet I did not have a root password set!
tortrakul (Sun Jan 1, 2011 (01:41:05)) [PermLink]: Thankyou especially in first step