Been searching for awhile on this and haven't found a solution.
Machine C has a persistent reverse tunnel to machine B. I.e machine B can connect back to machine C thru the reverse tunnel. I can rsync files from C to B and then retrieve them with A to B.
How would one rsync from A to C and retrieve files.
I can can currently connect directly to C from A with
ssh -A -t HostB "ssh user@localhost -pXXXXX"
Thanks
Best Answer
I was struggling with exactly the same problem. The solution is to use ssh port forward on the machine initiating to machine B, and ssh reverse port on the machine that receives. In the following examples--
Machines A and C have persistent reverse port forward connections to B. e.g. setup with the following--
If machine A wants to access machine C, machine A sets up a ssh forward port connection to the reverse port that C has set on B, e.g.--
With this connection, A can then initiate a connections to C.
On A get a terminal on C in one step--
On A transfer a directory with files to C, e.g.--
If wants C to access A, C sets up a forward port connection to B using the reverse port A set on B, e.g.--
C then can ssh to A in one step such ssh, rsync, etc.