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/ \

I get this error after entering the password:

protocol version mismatch -- is your shell clean?

and then it dies.

Has anyone got any ideas?


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).

  • 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

  • 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). Feb 22 '11 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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