

I tried to do that with Filezilla (trunk) on Linux. So, to solve the problem in passive mode, just after the answer to the PASV command, and before the RETR or directory listing command, the FTP client should create an SSH tunnel from localhost to with the same port number on both sides (as specified by the server after PASV). With both IP addresses, it will be impossible to connect ( is not directly accessible, and localhost does not have an SSH tunnel on the specified port). The port number is specified by the server.

In passive mode, Filezilla accesses the server using the IP specified in response to the PASV command, if it is routable, or the IP address used for the control connection, if the other one is not routable.

In active mode, it requires a connection from server to client, which is impossible in most cases. SSH tunneling allows to encapsulate the FTP control connection:īut there is still a problem with the data connection. In these cases, when an SSH connection is possible, it can be useful to have some type of SSH proxy act as a gateway to the FTP server. Sometimes it's not possible to access FTP servers, or other times the FTP server can be located on a private network. It's a common problem to have a restricted Internet connection.
