Here's something that has been giving me fits, and I'm hoping someone can
shed the light.

Both foo and bar are Solaris 7 machines.

I initiate ssh2 with port forwarding:

        foo% ssh -L 1234:bar:21 foo

Which I take to mean this: "create an ssh session between foo and foo, but
forward foo's port 1234 to bar's ftp port."  I shoul;d be able to ftp to
foo's local 1234 and actually be connected to bar's ftp, right?

Thus:

        foo% ftp localhost 1234
        Connected to localhost.
        220 bar FTP server (SunOS 5.7) ready.
        Name (localhost:phurvitz): 
        331 Password required for phurvitz.
        Password:
        230 User phurvitz logged in.
        ftp> ls
        200 PORT command successful.
        425 Can't build data connection: Connection refused.


So I try this:

        foo% ssh -L 1234:foo:21 bar

and then (in a shell still on foo)

        foo% ftp localhost 1234
        Connected to localhost.
        220 foo FTP server (SunOS 5.7) ready.
        Name (localhost:phurvitz): 
        331 Password required for phurvitz.
        Password:
        230 User phurvitz logged in.
        ftp> ls
        200 PORT command successful.
        150 ASCII data connection for /bin/ls (127.0.0.1,35390) (0 bytes).
        ... all my files are listed ...

But why would I want to ftp to foo from foo?!! I want to ftp to foo's local
port 1234, and have that tunneled through ssh to bar's ftp port, but this
"425" error keeps me from building a data connection!

-P.

******************************************************************************
Phil Hurvitz, MFR | GIS Specialist | College of Forest Resources | 355 Bloedel
Box 352100 | University of Washington, Seattle, Washington  98195-2100, USA
 tel: 206.685.8179 | FAX: 206.685.3091 | e-mail: [EMAIL PROTECTED] 
             WWW: http://lobo.cfr.washington.edu/~phurvitz/
******************************************************************************


Reply via email to