I can't seem to find a close enough example but here it goes.
I'm trying to in the end setup rsyncrsync from one server to another through an sshssh tunnel. Local (my machine) will run the rsyncrsync to pull files from a remote server through the sshssh tunnel.
I can connect with this command:
$ ssh -L 1522:localhost:middlemanip:1521 user@server
$ ssh -L 1522:localhost:middlemanip:1521 user@server
My rsync attempts led me to try this:
$ rsync -avz -e "ssh localhost:1522:middlemanip:1521 ssh" user@server:/source /dest/
$ rsync -avz -e "ssh localhost:1522:middlemanip:1521 ssh" \
user@server:/source /dest/
But this doesn't seem to work. I moved to autossh where I attempted this ->
$ autossh -M 1522 -q -f -N -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -L localhost:middlemanip:1521 user@server where I attempted this:
$ autossh -M 1522 -q -f -N -o "ServerAliveInterval 60" \
-o "ServerAliveCountMax 3" -L localhost:middlemanip:1521 user@server
No luck so far, but there may be a better way to do this then what I have laid out?