For enabling root user in ubuntu you need to run only 2 cmd ....
1st CMD-
$ sudo sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
2nd CMD-
$ sudo systemctl restart ssh
Thanks for visiting our blog.