Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have enabled the password for root using the command #passwd root and now I want to connect to the server via SSH as root. I am unable to do this and somehow the root account cannot be accessed via SSH. What is the name of the file I have to edit and allow root login.

I have Ubuntu server 10.04 LTS

share|improve this question
You really shouldn't use the root account. It's one of the main security principles that Ubuntu uses. Instead, you should use a standard user account and use the sudo command. Is there a reason you need the root account? – jackweirdy Nov 20 '12 at 13:16
Agreed - Every hacker knows that a computer running GNU/Linux has a "root" account - so now they have to guess one less thing in order to log into your system. If you're using passwords, that's even worse. Figure out what you want to do, and make an account that does only that - and you can use SSH keys, this allows for automation. – Broam Nov 20 '12 at 16:49
another vote for leaving root ssh access disabled - ssh in using a regular user and use sudo or su after you're logged in. – ImaginaryRobots Nov 20 '12 at 17:35
up vote 1 down vote accepted

Have you installed the SSH server on your machine? Here is a brief tutorial. You will need to edit the file /etc/ssh/sshd_config

share|improve this answer

You are much better off running sudo bash when you want a root terminal. Anyone in the sudo group can do it. Allowing root ssh is not wise.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.