ftp a file directly from a 3-rd machine?
Dear Slackers, this is not Slackware-specific question, but I am sure
somebody will be able to get me the answer. So, let my machine be A, a Linux Server be B, and an ftp server be C. Code:
A - B - C, Can I download a file from C directly to A without saving it on B's hard drive? Best regards, Martin |
Sorry I'm not a slackware fan, hope it's OK answering you question...
FTP is hard to tunnel as it's an archaic protocol, but using ssh as a SOCKS proxy you should be OK. There's a guide here, that I found on google in 5 seconds :) http://www.styryx.com/en/computers/s...eling-over-ssh |
Try "man lftp" and scroll down to the "get" command explanation. One of the examples is what you want to do.
|
Thank You for the replies.
@Richard Cranium: Unfortunately there is no lftp on machine B, so I think there is no way to get this method to work for my problem @acid_kewpie: I read the tutorial, but I can only use the command line. And the explanation for the command line there is vague, could you provide some sample commands? |
from an ssh command, you'd just use the -D <port no> option instead of the Dynamic radio button on PuTTY. The rest should be logical equivalent.
|
Quote:
|
well, yes... there is a fairly simple way.. but you need an additional piece of software on B.
http://slackbuilds.org/repository/14...rk/sshfs-fuse/ you install this, and mount a folder on system A from system B... then you ftp from C to that folder on B (which really pushes it to A as that's where the folder is) not sure if that is exactly what you were going for, but I've been using this to push files all over the network here without needing to do more than mount the folders and cp. |
oh yeah, that's not a bad trick if you can install the software on the MITM box
|
If the ftp client on B can write to stdout you could probably do the equivalent of the ssh tar pipe
ssh user@B 'tar zcf - stuff' | tar zxf - from A, but instead of tar, run the remote ftp process and pipe it a local cat or something pointing into a file, or leave the tar's and add an ftp in the remote command in front of and piping into the tar something like ssh user@B 'curl ftp://serverC.local/file' > localcopy.file http://linux.icydog.net/ssh/piping.php |
Yes, in fact ncftpget would be ideal for this.
Code:
ssh user@B 'ncftpget -c ftp://serverC/pub/somefile.bz2' > somefile.bz2 |
All times are GMT -5. The time now is 02:34 AM. |