Re: tunnelling

From: Simon Tatham (anakin@pobox.com)
Date: 03/05/02


From: Simon Tatham <anakin@pobox.com>
Date: 05 Mar 2002 11:28:52 +0000 (GMT)

Matthias Wulkow <trespassa@gmx.de> wrote:
> If I want to tunnel a ftp (ftp-control-port 21) connection I have to
> make a connection with ssh from my win98 machine port 21 to the ftp
> server I want to connect to, port 21 (normally).

`make a connection' is misleading language and I suspect it is this
which is confusing you.

What you're doing is telling your SSH client to _listen_ on port 21
of your local machine. Then you tell your FTP client to connect to
port 21 of your local machine. When a connection comes in, the SSH
client instructs the SSH server to make a connection to port 21 of
the _remote_ machine. Data your FTP client sends to your SSH client
is encrypted, sent down the existing SSH connection, and sent on to
the real FTP server.

> My question is, why should the ftp server accept my ssh connection
> to port 21? How does that work?

You're not making an SSH connection to port 21. You're making an FTP
connection to port 21 of your local machine (which is being answered
by your SSH client), and your SSH server is making an FTP connection
to port 21 of the FTP server.

Does that make any more sense?

-- 
Simon Tatham         "loop, infinite _see_ infinite loop"
<anakin@pobox.com>     - Index, Borland Pascal Language Guide



Relevant Pages

  • RE: Telnet/ftp problems SBS2000
    ... Please make sure your client computers are configured as both Firewall ... will find two options "Enable folder view for FTP sites" and "Use Passive ... that the control connection has been successfully established, ... (other than port 21) ...
    (microsoft.public.windows.server.sbs)
  • Re: IPSwitch, Inc. WS_FTP Server
    ... > bounce attack as well as PASV connection hijacking. ... > The FTP bounce vulnerability allows a remote attacker to cause the ... > anonymously along with any internal addresses that the FTP server has ... That means it's got to handle a PORT ...
    (Bugtraq)
  • RE: FTP Window of opportunity?
    ... target on the line when in reality it was just a firewall lying to them. ... The connection connects and then immediately ... Subject: FTP Window of opportunity? ... the FTP port shows up. ...
    (Pen-Test)
  • UPDATE: Re: Question regarding SSH via Lantronix SCS100
    ... to do SSH and to authenticate the SSH connection with a local ... unexpectedly closed connection'. ... CONSOLE or AUX port on the router, or does it matter, and what ...
    (comp.dcom.sys.cisco)
  • Re: SSH options re: NAT
    ... No, SSH is two-fold, a call to it on the client side results in a call ... port, meaning that any connections that come into that port are answered ... programming practice for daemons) Once the connection is established, ... don't want to execute a command on the remote side and you use -N. ...
    (comp.security.ssh)