Normally Ubuntu allows you to install OS as non root username
So you need to login to server as non root user and run command mentioned below to login as root user
sudo -i
Once you login as root user change below mentioned parameter in /etc/ssh/sshd_config
and uncomment PermitRootLogin paramter and change to to yes and restart sshd using command
service sshd restart
