sudo su
mv /root/.ssh/authorized_keys /home/ubuntu
chmod 777 /home/ubuntu/authorized_keys
Remove the string:
no-port-forwarding,no-agent-forwarding,no-X11-forwarding,command="echo 'Please login as the user \"ubuntu\" rather than the user \"root\".\';echo;sleep 10"
chmod 600 /home/ubuntu/authorized_keys
mv /home/ubuntu/authorized_keys /root/.ssh