ssh tunnel and ftp

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have host-a (ssh client, ftp client) and host-b (sshd and ftpd).
host-a wants to ftp to host-b, over ssh encrypted tunnel (command and
data if possible). host-a wants to use the command,

    ftp host-b

and not have to use any other ports, i.e. the tunnelling has to be
transparent to both ftp client and ftpd on both host-a and host-b.

What are the ssh commands needed to achieve this? Note I have set up
user keys for the root accounts so root can ssh seamlessly between the

Re: ssh tunnel and ftp

Quoted text here. Click to load it

Since you don't mention which platform or ssh implementation you're using
it's hard to say.

Some ssh implementations support enough of the ftp protocol to support
ftp over ssh by interpretting the ftp commands.  Check the documentation
for yours to see if this is the case.

Others don't, but do support dynamic forwarding (ie SOCKS).  Ought to work
if your ftp client and server support passive mode and the ftp client
can be SOCKSified (either native support or a tool such as runsocks or
socksify) or your OS supports stack-level socksification (this is the
case for AIX and I believe Mac OS X).

Darren Tucker (dtucker at
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

Site Timeline