Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Suppose that I had set the root password before with ssh key. Hereinafter, I want to let the root without password. Is there a way to do that?

Thank you

share|improve this question
    
This may be of some help to you. I'm not familiar with doing what you want, so I can't support you further. help.ubuntu.com/community/RootSudo –  Paul-92711864 Dec 9 '13 at 23:37
    
What do you mean? Did you set a password on the root account, or install your ssh key into /root/.ssh/authorized_keys? –  psusi Dec 10 '13 at 2:46
    
@Dash_plus_Java : Thank you for the reference, I will read it and try to understand. –  Santosa Sandy Dec 13 '13 at 9:28
    
@psusi , sorry for not being precise, but I mean when we set root password on the root account. When we leave the password blank, is that mean that we have no root password? BTW, I am also interested about installing ssh key into /root . Would you mind to give me a little explanation on that? Thank you –  Santosa Sandy Dec 13 '13 at 9:28

2 Answers 2

up vote 1 down vote accepted

In Ubuntu the root account has no password but is locked by default, so that you can not log in as root using a password. If you paste your public key ( ~/.ssh/id_rsa.pub ) into root's authorized_keys file ( /root/.ssh/authorized_keys ) then you can log in via 'ssh' as root without needing a password.

share|improve this answer

Yes you can set the root without password to SSH login without password, but it's highly not recommended, user other user then use su to become root.

share|improve this answer
    
OK thanks for trying to answer. –  Santosa Sandy Mar 29 at 19:43

Your Answer

 
discard

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.