Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried using SSH port forwarding with FTP but it didn't work even though I used FTP connections.

It seems that the FTP server gives you another port number to use, so you must be able to connect to that port in order to receive data from the server.

So it seems rather complicated. Is there any way to do this?

It must also be noted that I have no permission to configure the FTP server, I have no access to the server besides using its FTP service.

share|improve this question
    
Are you aware of SFTP, and is there any reason for not using it in this case? –  Daniel Andersson Apr 18 '12 at 7:33
    
I don't know about the OP, but the reason I need to is that my university's wireless blocks all outgoing ports except for 80 and 443, as well as allowing ssh access to the uni's Unix box, which doesn't have any outgoing ports blocked. –  Andrew Dunn Apr 18 '12 at 7:40
    
It appears that the FTP server is using passive FTP (with dynamic data ports) rather than active (data ports is 20); or that port 20 is blocked. Perhaps the OP could explain exactly what he is trying to achieve, but I assume it is similar to Andrew Dunn's situation. –  lupincho Apr 18 '12 at 7:56

1 Answer 1

up vote 0 down vote accepted

You need to use dynamic forwarding with -D, which creates a SOCKS proxy able to connect to any host:port, instead of a static tunnel.

Of course, a FTP client that supports connecting through SOCKS proxy is necessary. If yours does not, there are programs that reroute all connections through such a proxy – tsocks and torsocks on Linux, torcap and sockscap on Windows.

No configuration on the FTP server is needed, only that it support "passive mode" (where the server selects the temporary ports). Practically all FTP servers support this.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.