This question already has an answer here:

How can I rsync files between two remote servers?

I need to transfer files between two remote hosts, but it seems rsync doesn't support synchronization.

Some more information: I have 2 servers A and B, and there is no direct connectivity between A and B. So direct rsync is not possible. But I have a 3rd server from when I have uni-directional connectivity.. Like I have the connectivity from C to A and C to B.

So can anybody help me here to rsync the file from server A to server B by using mediator as C?

Thanks in advance.

marked as duplicate by Kiwy, Wouter Verhelst, roaima, jw013, Anthony Geoghegan Mar 20 '18 at 14:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Whilst its not the nicest way of doing it, here's an option:

Use SSHFS. Create two folders on your local system (serverC) (e.g. folder1, folder2).

sudo apt-get install sshfs

then run this:

sudo sshfs -o allow_other,defer_permissions user@serverA:/<folder>/ /mnt/folder1

and this:

sudo sshfs -o allow_other,defer_permissions user@serverB:/<folder>/ /mnt/folder2

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