rsync and ssh port forwarding (2nd try)
Dean S. Messing
deanm at sharplabs.com
Sat Oct 6 03:12:47 UTC 2007
I don't think my first posting on this was very clear. Let me try again.
I am trying to `rsync -e ssh' with a work machine "B" from my laptop
at home. I only have direct access from home to work machine "A".
For ordinary use of `ssh' and `scp' I use port forwarding via "A" to
"B" from my laptop when I use it from home. Thus, in the background
on my laptop (when I'm home), I have running:
`ssh -N A.WorkDomain -L N:B:22'
where N is the localhost (laptop) port number that I want to forward,
and "A.WorkDomain" is the fully qualified name of my work machine "A".
This allows me to do things like:
`ssh localhost -p N' and `scp -P N localhost:/tmp/foo /tmp'
which then connects "directly" to "B" at work (via "A").
But now I need to rsync a directory on B to my laptop at home using
`rsync -e ssh'.
Were my laptop at work, I'd just do (say):
`rysnc -a -e ssh --delete B:/tmp/ /tmp/'
since from work I have direct access to "B".
But from home I must do something like
rysnc -p N -a -e ssh --delete localhost:/tmp/ /tmp/
The problem is that there doesn't appear to be any such "port flag"
for rsync. I just missing the flag among the gajillion or so
rsync flags? If not, how does one do this?
Dean
More information about the users
mailing list