EDIT: Putting exactly what was done
I need to SSH localhost without password, the usual way of doing it (with public keys) do not work.
user@PC:~$ rm
I encountered the same problem when running unit tests on Docker container(golang:1.13-alpine).
After sshd -Dd and ssh -vv root@localhost debugging, I found the reason:
sshd -Dd
ssh -vv root@localhost
User root not allowed because account is locked
So, we should unlock the account by passwd -u or set a password.
passwd -u