Some Linux distributions, such as Ubuntu Server, do not allow the Root user to log in to SSH by default.
To allow Root access via SSH, edit the sshd_config file:
vim /etc/ssh/sshd_config
Then look for the PermitRootLogin directive and change it to the following:
PermitRootLogin yes
Now restart the SSH service:
service ssh restart
That’s it!