Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.