1

I have the following setup: Machines A, B , C running linux. I have to do a continuous rsync from machine A to machine C and have a script for that. However, the access to machine C from machine A is only through B. So I have to ssh into B and then I can ssh into C.

The way to rsync that I have now is that first I rsync from C to B and then rsync from B to A. However, with the additional copy between the machines, this is

1
  • 1
    "With the additional copy between the machines, this is..." This is what? I think I know what you're trying to ask, but please finish your question... Commented Mar 27, 2013 at 7:59

1 Answer 1

3

You can use netcat for this. Here's an example setup:

On machine A, your ~/.ssh/config looks like this:

Host            machinec.whatever.domain.com
ProxyCommand    /usr/bin/ssh machineb /usr/bin/nc %h %p

(with any addition of IdentityFile or anything else that you may require)

This will let you rsync straight through machine B; netcat/nc will forward the entire data stream for you. Of course, this requires that nc be available in that path on machine B.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.