Once I needed to use rsync to copy a lot of data from the server to which only the root user had access, so I allowed the root user to connect via ssh.
By default in Ubuntu, the root user does not have a password, so we will create one if it has not already been done:
sudo passwd root
Then open the SSH server configuration file in any text editor, for example nano (CTRL+x to exit):
sudo nano /etc/ssh/sshd_config
Find the PermitRootLogin parameter and change it to yes to allow the root user to connect:
Restart ssh to apply the changes:
service sshd restart