I actually do this quite often, but it is not necessarily "
trivial". ;-)
Code:
# Open a local forward from C to A through B
me@C ~]$ ssh -L1234:IP-of-A:22 IP-of-B
# Connect to A from C through the local tunnel and \
configure a reverse forward to D
me@C ~]$ ssh -R4321:IP-of-D:22 -p 1234 localhost
# Connect from A to D through the 2nd tunnel and \
configure a local forward to E
me@A ~]$ ssh -L2222:IP-of-E:22 -p 4321 localhost
# Connect from A to E through the local forward on A
me@A ~]$ ssh -p 2222 localhost
I think that should do it. I am not in a position to confirm with my use and once I got it working I heavily leveraged ~/.ssh/config so I do not have to remember it all so meticulously. Also, you can "piggy-back" the SSH connections without actually have to use a shell, but should save that for after you get it working this way. You will need multiple shells; I use
screen when I need to do something like this until I get it all worked out and more
automated.
Once you are able to successfully ssh from A to E using the various tunnels/directions, you can pretty much shove whatever you want through it using rsync, scp, sftp, sshfs, tar, np, ... it really is up to you at that point.