1

When trying to log in as root (with public key) to an Ubuntu 14.04 LTS box, the OpenSSH server will just say

Server refused public-key signature despite accepting key! 

I have enabled root login by setting PermitRootLogin accordingly and have also restarted SSH with /etc/init.d/ssh restart.

I have also verified that this specific error would not occur if my key were wrong or not in /root/.ssh/authorized_keys.

Why can't I log in ?

Disclaimer: Yeah, I know that using a root account on Ubuntu is not the proper way to do it, but I was told to. Meh.

1 Answer 1

2

Apparently the problem lies with the seemingly innocuous /etc/init.d/ssh restart.

Although it does not print any errors, it will simply not restart / reload the server, therefore root login is not yet enabled.

The solution is to just use service ssh restart. Duh.

I know that the /etc/init.d way is deprecated but as long as it is still supported I'd prefer using it though.

Ubuntu's service script should at least fail rather than do nothing, ah well.

1
  • 1
    The script checks to see if it's being run by upstart and exits silently if not - which isn't great. Commented Jun 13, 2014 at 12:51

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.