[lug] SSH Tunneling FTP

rm at mamma.varadinet.de rm at mamma.varadinet.de
Thu Feb 8 16:27:18 MST 2001


On Thu, Feb 08, 2001 at 04:14:53PM -0700, Warren Sanders wrote:
> I'm trying to port forward FTP on a Windaws box using SSH client PengiNet.
> The registered version I have does port forwarding to or from remote
> system.  By testing, I would disconnect the SSH connection to see if the
> FTP would die.  In all tests, FTP continued as normal, proving the ports
> were not forwarded.  I must not understand the concept.  So without going
> into a lot of detail on what all I did, could someone explain some do's
> and don'ts of port forwarding?

What exactly do you mean by '... continued as normal'. Can you still send
out commands like 'dir' to the server or do you mean that the data is
still comming in. The late is normal, since ssh only tunnels the control
channel but _not_ the dat channel. FTP works with two tcp connections,
one to issue commands and the other(usually opened from the server back
to the client unless you use the PASSIVE command) to send data.

> In a nutshell, I would forward port 21 to say 4421 on the SSHd and FTPd
> destination.  Also tried forwarding SSHd FTPd destinations 21 to local 21
> but that produced a binding error due to it already being use.

Port 21 is the control channel ...


 Ralf



More information about the LUG mailing list