View previous topic :: View next topic |
Author |
Message |
vuakko Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/12003882464649d8c4e14b6.jpg)
Joined: 09 May 2007 Posts: 138 Location: Helsinki, Finland
|
Posted: Mon Feb 11, 2008 6:52 pm Post subject: SCP from A to C across B |
|
|
A: my machine, which has the files
B: a public gatekeeper for C among others.
C: machine, where I want the files. I can SSH here from B.
So there you have it. I have sshfs for B at A if it helps a thing.
The lazy solution would be to first copy the stuff to B and to
C from there, but that would be wimpy (bad aftertaste 'n all that).
Another complication: Machine A is masked by the ISP (trying to
get them drop it...) so I can't run sshd at A and manage the copy
from B. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
embobo Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 19 May 2003 Posts: 311
|
Posted: Mon Feb 11, 2008 7:58 pm Post subject: |
|
|
Port forward from port X on B to port 22 on C and use "-P X" in your scp command line. You can accomplish the port forwarding with iptables or another ssh session. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
vuakko Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/12003882464649d8c4e14b6.jpg)
Joined: 09 May 2007 Posts: 138 Location: Helsinki, Finland
|
Posted: Mon Feb 11, 2008 8:27 pm Post subject: |
|
|
Thanks, that was kind of too easy then after all. I had just tried wrong forwarding tactics.
Full final solution for future reference (at A in two different shells):
Code: |
ssh -L 44444:C:22 B
scp -r -P 44444 pathAtA localhost:pathAtC
|
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|