By default root account will available in Ubuntu but not activated.
For root access we need to use sodo.
To activate you need to update it’s password.
$ passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
After updating root password now try to ssh to your machine from local host or any other machine, it should allow us to access as root user.