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?

link|improve this question
feedback

1 Answer

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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