Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to backup my linux webserver to our local windows sbs 2003 server in the office. I have set up ssh and cwrsync on the windows server and have confirmed that the linux server can reach the windows server via the command:

ssh RemoteUser@xxx.xxx.xxx.xxx

It asks for a password and connects fine. However when I run this command to start the backup:

rsync -avz -e ssh home/account/public_html/some/small/directory/ \
    remote_user@xxx.xxx.xxx.xxx:/cygdrive/c/backup/destination/directory/

I get this error after entering the password:

protocol version mismatch -- is your shell clean?

and then it dies.

Has anyone got any ideas?

share|improve this question

2 Answers 2

This error message is explained in rsync's FAQ.

It means that some program is writing something when the ssh connection is established (and it breaks rsync).

share|improve this answer
    
To clarify: by "writing something", that's "producing some output", not "writing to some file somewhere". –  mattdm Feb 22 '11 at 18:51

In your /etc/ssh/ssh.conf or if you have your own ssh.conf in your home folder (~/.ssh/...) try to change the protocol version from 2 to 1 or whatever protocol is running on your windows machine. For more details see man ssh and man ssh.conf

share|improve this answer
    
I'm not completely sure a weird setup involving mixed versions of SSH couldn't cause this message, but I highly doubt it. The “protocol version mismatch” in the message is about the rsync protocol, not about the underlying transport (which happens to be ssh here). –  Gilles Feb 22 '11 at 19:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.