On your device, create a new SSH key (private/public key).
Get the content of the public key.
On the remote host (with sudo -i)
mkdir -p /root/.ssh
Then open the file
And paste the content of the public key at the end of the file. Exit and save.
Open ssh configuration
Be sure that the line PermitRootLogin is uncommented and with the value
PermitRootLogin prohibit-password # Access with Key
Restart SSH daemon.