Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am going to explain this problem as best I can, so please bare with me.

I am on a linux server (server A), I can SSH to another linux server (server B). Once on server B, I can SSH to another linux server (Server C). So basically, Server A can not talk directly to Server C without going through Server B. Here's the problem: I need to rsync server A and C, initiated by a script on server A.

Any suggestions?

share|improve this question

Not the most elegant solution, but you can create ssh tunnel to server C via server B (this command creates ssh tunnel in background, so you have to bother killing it after finishing rsyncing):

ssh -f -N -L 2222:<C>:22 <username>@<B>

and then just tell rsync to connect to localhost:2222 instead of <C>:22.

Of course you can specify any other temporary port instead of 2222

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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