I want to sync a folder from my machine with a folder on a remote machine. The remote folder can only be manipulated by
root. I have an account on the remote machine which can use
sudo. How can I run rsync such that it has root permissions on the remote machine?
I've tried the following:
rsync -avz -e ssh /home/ubuntu/my/lovely/folder email@example.com:/remote/lovely/folder --delete --rsync-path="sudo rsync"
But (after entering my password) I get the following error:
sudo: no tty present and no askpass program specified