Subject: ftp forwarding under ssh?
To: None <port-mac68k@NetBSD.ORG>
From: era eriksson <reriksso@cc.helsinki.fi>
List: port-mac68k
Date: 03/23/1997 01:23:24
I can't seem to get ftp to accept secure forwarding under ssh. 
I've done what the FAQ suggests, i.e. 

   Window 1                              Window 2
   --------                              --------
   local$ ssh -L 1999:remote:21 remote
   reriksso's password: 
   remote$
                                         local$ ftp localhost 1999
                                         remote ftp server ...

and I can actually (1) get this to work between two of the remote
hosts (even in different domains, as long as I can log in from one to
the other) and (2) get as far as setting up a control connection to my
MacBSD box from any of the others, but when it comes to transferring
data, there is apparently a problem with creating the data connection.

Here's an actual example:

 # Have an slogin running, logged in and all, 
 # with forwarding set up as indicated above

 $ uname -a
NetBSD hello 1.2 NetBSD 1.2 (GENERIC) #1: Wed Sep 11 00:43:55 CDT 1996     scottr@spot:/usr/src/sys/arch/mac68k/compile/GENERIC mac68k
 $ which ftp
ftp is aliased to `ncftp'
ftp is /usr/bin/ftp
 $ \ftp localhost 1999
Connected to localhost.
220 kruuna FTP server (UNIX(r) System V Release 4.0) ready.
Name (localhost:era): reriksso
331 Password required for reriksso.
Password:

230 User reriksso logged in.
ftp> dir
200 PORT command successful.
425 Can't build data connection: Connection refused.
ftp> quit
221 Goodbye.
 $ 

Is there something with the ftp connections MacBSD sets up or should I
just use a different technique to do the forwarding? I've played
around with the -L and -R flags but I have a hard time getting
anything to work (or actually really understanding what I'm doing :-)
(I also tried to use ncftp which surprisingly does allow you to use a
-P flag to set the port to use but it's just too user-friendly for me
and also it doesn't work, either.)

/* era */

Yes, that's a plain ole #1 GENERIC 1.2 kernel.

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>