Rsync over ssh with root privileges

Kevin Korb kmk at
Sun Jul 22 19:51:18 MDT 2012

Hash: SHA1

Since you are using sudo on the remote end have you configured it to
not require a password for that user to run rsync?  I suspect that
your use of the double -t on ssh that it isn't.  Rsync over ssh is not
going to be compatible with a sudo password prompt.

On 07/22/12 21:47, Stayvoid wrote:
> Hi,
> I'm trying to copy some files from a remote server. (That server
> uses passphrase to auth users.) Rsync should be able to copy files
> with root privileges.
> Here is my attempt:
> sudo rsync -avP --exclude 'proc' --exclude 'dev' --exclude 'tmp' 
> --exclude 'sys' --exclude 'mnt' --rsync-path='sudo rsync' -e "ssh
> -t -t -i /home/USER/.ssh/key" USER at SERVER:/  /mnt/backup/
> Response:
> protocol version mismatch -- is your shell clean? (see the rsync
> man page for an explanation)
> The following file is empty:
> ssh remotesystem /bin/true > test.dat [1]
> Any ideas? Am I using the correct syntax?
> Thanks
> [1]

- -- 
	Kevin Korb			Phone:    (407) 252-6853
	Systems Administrator		Internet:
	FutureQuest, Inc.		Kevin at  (work)
	Orlando, Florida		kmk at (personal)
	Web page:
	PGP public key available on web site.
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


More information about the rsync mailing list