Here's how to do it:
1. Log in as ubuntu user
2. Run sudo passwd root
Ask for password and confirm password
3.sudo vi /etc/ssh/sshd_config modify ssh configuration
Find #PermitRootLogin prohibit-password
Change to PermitRootLogin yes
press esc
:wq!Save and exit
4. Restart the ssh service
sudo service ssh restart
-----------------------------------