rkhunter warning about ssh root access when that access is not allowed on the system
12,469
Solution 1
The following values need to match:
In
rkhunter
configuration:cat /etc/rkhunter.conf | grep ALLOW_SSH_ROOT_USER
ALLOW_SSH_ROOT_USER=no
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.
Solution 2
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
Related videos on Youtube
Author by
somethingSomething
Updated on September 18, 2022Comments
-
somethingSomething over 1 year
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
-
Joshua Lokken about 9 yearsYes, thank you for the edit! Still getting used to the editor.
-
lepe over 6 yearsEverywhere 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!