Thanks to: https://crashingdaily.wordpress.com/2007/06/29/rsync-and-sudo-over-ssh/
sudo rsync -av -e "ssh" --rsync-path="sudo rsync" username@srv01.prod.example.com:/tftpboot/ /tftpboot/
I SSH(ed) to the remoteA and forwarded my ssh keys (ForwardAgent yes) and ran this command:
Breakdown:
sudo rsync -av -e "ssh"
^ On the host I'm running this on run it under sudo
--rsync-path="sudo rsync" username@srv01.prod.example.com:/tftpboot/ /tftpboot/
^ On the remote server run rsync server as sudo
No comments:
Post a Comment