Debian disables root ssh access by default due to security risk. In general, it is not a good idea to enable root ssh but if you must, edit /etc/ssh/sshd_config and change
PermitRootLogin without-password
(without-password is misleading – it actually means password authentication is disabled for root) to
PermitRootLogin yes
See Ubuntu sshd_config man page for PermitRootLogin options details. Occasionally, I have this option enabled for the intial configurations after Debian installation and immediately disabled it as soon as configuration is completed.
If it is necessary to ssh as root user regularly, I would still disable root authentication by password and
- either use certificate for authetication
- or logon as other user and “su -” to switch to root to perform the necessary admin tasks and then exit.
It is best stick to the best practices and use “sudo” for any administrative tasks.