How to resolve "rsync error: protocol incompatibility (code 2)"?

Posted on 2012-08-17
Last Modified: 2012-09-01
Hello Experts,

I'm trying to copy a few files from one server to another (both are remote) from my Windows 7 Prof machine.

'A' to box 'B'. Since I don't have SSH access on box 'A', I'm trying to pull files from box 'A'

I tried this rsync command:
rsync -avrPtz -e 'ssh -p 2202' username@xx.2xx.1xx.xx2:/home/username/somefolder/* /home/username/files/COPIED

Open in new window

but I get this error message instead:
protocol version mismatch -- is your shell clean?
(see the rsync man page for an explanation)
rsync error: protocol incompatibility (code 2) at compat.c(173) [Receiver=3.0.7]

Open in new window

Any ideas would be appreciated. TIA..
Question by:gam8
    LVL 26

    Accepted Solution

    To start: Connect to both machines, and at a command prompt enter:

    rsync --version

    And assuming it finds an install:

    which rsync
    which ssh

    Note the paths on both the LOCAL and REMOTE compters and plug them into the --rsh and --rsync-path elements of the following rsync call:

    rsync -avzP --rsh="/LOCAL_PATH/bin/ssh -l username -p 2202" --rsync-path=/REMOTE_PATH/bin/rsync  xx.2xx.1xx.xx2:/home/username/somefolder/ /home/username/files/COPIED

    Open in new window

    Then report back.
    LVL 13

    Assisted Solution

    This is normally due .bashrc file. You can just move the .bashrc on remote host to some other name and rsync should work fine again.


    Author Closing Comment

    Thanks so much for the responses.. My apologies for the delay.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Have you ever stumbled upon a software that is so great that you just love? It happened to me. Love at first sight. Filezilla Server.   Ok its not the most advanced ftp server I've came across. But its a fairly simple piece of software to get the …
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now