8

I just ran rkhunter --check and all was good except this:

Checking if SSH root access is allowed                   [ Warning]

What does this warning mean? SSH root access is not allowed on this system.

EDIT #1

Here is how my /etc/ssh/sshd_config is set:

PermitRootLogin no

and rkhunter.conf

root ~ # cat /etc/rkhunter.conf | grep  ALLOW_SSH_ROOT_USER
#ALLOW_SSH_ROOT_USER=no
ALLOW_SSH_ROOT_USER=unset
Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
somethingSomething
  • 5,721
  • 18
  • 58
  • 98

2 Answers2

13

The following values need to match:

  1. In rkhunter configuration:

    cat /etc/rkhunter.conf | grep ALLOW_SSH_ROOT_USER
    
    ALLOW_SSH_ROOT_USER=no
    
  2. In sshd configuration:

    cat /etc/ssh/sshd_config | grep PermitRootLogin
    
    PermitRootLogin no
    

Once they do match, you should not be warned by rkhunter any longer.

Vlastimil Burián
  • 27,586
  • 56
  • 179
  • 309
Joshua Lokken
  • 341
  • 2
  • 4
5

In case you have set in your /etc/ssh/sshd_config

PermitRootLogin without-password

Again in the /etc/rkhunter.conf the value must match, as in the following example:

ALLOW_SSH_ROOT_USER=without-password
dan
  • 61
  • 1
  • 2
  • Everywhere I read, it is specified that (in case of Ubuntu), you should write: ALLOW_SSH_ROOT_USER=yes, but that doesn't work. This answer solves it! Thanks! – lepe Sep 09 '17 at 04:58