debian8 installed and all config id default
i tried N times to login with root and password by ssh client always faild
after check /etc/sshd/sshd_config i found 2 keypoints
... PermitRootLogin without-password # ??? ... #PasswordAuthentication no # password login enabled by default, so login with password should be ok but actually not
the PermitRootLogin config is the problem
PermitRootLogin Specifies whether root can log in using ssh(1). The argument must be “yes”, “without-password”, “forced-commands-only”, or "no”. The default is “yes”. If this option is set to “without-password”, password authentication is disabled for root. If this option is set to “forced-commands-only”, root login with public key authentication will be allowed, but only if the command option has been specified (which may be useful for taking remote backups even if root login is normally not allowed). All other authentication methods are disabled for root. If this option is set to “no”, root is not allowed to log in.
“PermitRootLogin without-password” means root login with password is disabled, after set “PermitRootLogin yes” and restart service ssh
now i can login with root & password via ssh client
then set ssh key login “vi /root/.ssh/authorized_keys” blabla
then uncomment “PasswordAuthentication no” to disable password login for all users
before service restart ssh, test your ssh key login works.