Can't login using ssh as root

Turns out the /etc/init.d/sshd script had no $OPTIONS variable, which would be the reference to the config file. Therefore sshd was starting without any config file at all, and hence, defaulting to "PermitRoodLogin no".

I resolved this by adding the following line near the start of /etc/init.d/sshd:

OPTIONS="-f /etc/ssh/sshd_config"

Hope this helps somebody else.


Login as root via ssh could be disabled in the PAM configuration.


I had the same problem, I can authenticate with any user but when I'm trying with root I get this message "access denied". The problem was solved by disabling UsePAM yes in /etc/ssh/sshd_config.

Change UsePAM yes to #UsePAM yes