View previous topic :: View next topic |
Author |
Message |
keifir Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/13373751443ec97a76de656.jpg)
Joined: 10 Jun 2002 Posts: 119 Location: Canada
|
Posted: Sat Jan 31, 2004 9:45 pm Post subject: Transferring files - from A to C through B. Possible? |
|
|
Hi,
here's my question. I'd like to transfer files from machine A to machine C with sftp. Here's my problem:
- host A can see B.
- host C can see B.
- host A cannot see C.
So, to transfer files from A to C , i have to go through B. Now i need to transfer large files and I don't have enough room to transfer them all to host B first and then to C.
Is there any way to transfer these files?
Thanx,
keifir |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
adaptr Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/17218567054377b9b6104ea.jpg)
Joined: 06 Oct 2002 Posts: 6730 Location: Rotterdam, Netherlands
|
Posted: Sat Jan 31, 2004 10:09 pm Post subject: |
|
|
If you can open up ssh tunnels for both connections you can simply pipe it through, or use an intermediate file.
If you have FTP access you may be able to use FXP; this is a sort-of protocol that allows you to control multiple FTP servers/clients from a central one. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jmoeller Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 07 Nov 2003 Posts: 114 Location: USA
|
Posted: Sat Jan 31, 2004 10:13 pm Post subject: |
|
|
Yep (I tried this out to make sure it works, too):
On A (replace <B> and <C> with their real names, of course): Code: | $ ssh -L 60022:<C>:22 <B> |
This makes it so that any requests you send on A to localhost:60022 will actually get sent by B to C on port 22.
Then, aagain on A: Code: | $ sftp -oPort=60022 localhost |
This will make said connection on localhost:60022, then get translated to C on port 22 (which happens to be what you need for sftp).
Now, you'll get that host key warning for localhost. It should be the same host key for C. Just remove the entry for localhost from .ssh/known_hosts on A after you're through. Have fun!
-EDIT-
D'oh! simultaneous entries! _________________ Cogito sumere potum alterum. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|