connection unexpectedly closed...

Nigel Gilbert n.gilbert at soc.surrey.ac.uk
Wed Jan 12 22:38:11 GMT 2005


When I run

rsync -v --exclude-from= -a --delete --numeric-ids -e ssh -i 
/root/.ssh/id_rsa /bin/ root at sandi:/export/home/scbackup/socnt01//bin/

I immediately get:

rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)
rsync -v --exclude-from= -a --delete -e ssh -i /root/.ssh/id_rsa /boot/ 
root at sandi:/export/home/scbackup/socnt01//boot/
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(359)

However, if I run exactly the same command, but with a normal user as 
the remote user instead of root, the rsync works as expected.

Both root and the normal user have passphraseless keys set.  the reason 
why I want the rsync to run with root as the remote user is that I want 
the UID and GID of the copied files to be preserved on the remote 
machine (which has users and UIDs  quite different from the local 
machine).

What could I be doing wrong which stops it working with root as the 
remote user?

thanks for your hints!

Nigel




More information about the rsync mailing list