• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 6051
  • Last Modified:

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

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:
Password:
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..
0
gam8
Asked:
gam8
2 Solutions
 
arober11Commented:
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.
0
 
LinuxGuruLinux Server AdministratorCommented:
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.

Cheers!!!
1
 
gam8Author Commented:
Thanks so much for the responses.. My apologies for the delay.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now