Networking Forums

Networking Forums > Computer Networking > Linux Networking > Can't get ssh and wu-ftpd to work together

Reply
Thread Tools Display Modes

Can't get ssh and wu-ftpd to work together

 
 
Richard Brandt
Guest
Posts: n/a

 
      10-26-2003, 04:16 PM
I am trying to follow the example in the "SSH-The Secure Shell" book for
tunneling the control channel thru ssh.
I setup the initial tunnel per the example
client% ssh -L2001:server:21 server
This works fine
client% ftp -vd localhost 2001
This also works fine (login has no problems)
but when I try to do any commands like "ls" it fails with

ftp:setsockopt (ignored ): permission denied
---> PASV
Entering passive mode(192,168,1,50,232,45)
ftp:connect: Connection refused

I see that the client does try to connect to the server at the right address
and port but gets a RST
When I run netstat on the server it shows LISTENING with the local address
127.0.0.1:59437
So I'm guessing the connection is refused since the server is just listening
on the loopback
But I don't know what else to change.
I have wu-ftpd 2.6.1-18
ftpaccess looks like this

class Test_guest_class guest *
limit Test_guest_class 2 Any /var/ftp/too-many.msg
# noretrieve /*
loginfails 2
private no
banner /var/ftp/banner.msg
hostname ftpserver
email root@localhost
message /welcome.msg LOGIN
message .message CWD=*
readme README* LOGIN
readme README* CWD=*
chmod no anonymous,guest
delete no anonymous,guest
overwrite no anonymous,guest
rename no anonymous,guest
umask no guest
passwd-check rfc822 warn
log commands guest
log security guest
log transfers anonymous,guest,real inbound
log transfers anonymous,guest,real outbound
guestgroup rftpusers
limit-upload guest 10000
limit-download guest 1
file-limit in 1 Test_guest_class
file-limit out 0 Test_guest_class
pasv-allow guest *
port-allow all
passive address 192.168.1.50 0.0.0.0/0


Richard Brandt


 
Reply With Quote
 
 
 
 
David Efflandt
Guest
Posts: n/a

 
      10-27-2003, 05:39 AM
On Sun, 26 Oct 2003, Richard Brandt <(E-Mail Removed)> wrote:
> I am trying to follow the example in the "SSH-The Secure Shell" book for
> tunneling the control channel thru ssh.
> I setup the initial tunnel per the example
> client% ssh -L2001:server:21 server
> This works fine
> client% ftp -vd localhost 2001
> This also works fine (login has no problems)
> but when I try to do any commands like "ls" it fails with
>
> ftp:setsockopt (ignored ): permission denied
> ---> PASV
> Entering passive mode(192,168,1,50,232,45)
> ftp:connect: Connection refused


You tunnel to the server, but have no -R tunnel coming back for ftp-data.
But since you do not know what port passive mode would use, you would
likely need to do a -R tunnel for the normal ftp-data port (20), but you
would have to ssh as root on the server to do that.

You could configure the ftp server to use high ports (> 1024) so ssh
tunnel could be done as a normal user (the ftp-data port would be the port
under the ftp port). Or if all else fails, ssh to server, ftp file to
server, scp file back to you.

--
David Efflandt - All spam ignored http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/
 
Reply With Quote
 
Richard Brandt
Guest
Posts: n/a

 
      10-28-2003, 12:14 AM
I know there are problems with a ssh tunnel for the data channel. I was
just trying to get the basics done and get a tunnel for the control
connection with a functional passive yet unencrypted data channel.

"David Efflandt" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Sun, 26 Oct 2003, Richard Brandt <(E-Mail Removed)> wrote:
> > I am trying to follow the example in the "SSH-The Secure Shell" book for
> > tunneling the control channel thru ssh.
> > I setup the initial tunnel per the example
> > client% ssh -L2001:server:21 server
> > This works fine
> > client% ftp -vd localhost 2001
> > This also works fine (login has no problems)
> > but when I try to do any commands like "ls" it fails with
> >
> > ftp:setsockopt (ignored ): permission denied
> > ---> PASV
> > Entering passive mode(192,168,1,50,232,45)
> > ftp:connect: Connection refused

>
> You tunnel to the server, but have no -R tunnel coming back for ftp-data.
> But since you do not know what port passive mode would use, you would
> likely need to do a -R tunnel for the normal ftp-data port (20), but you
> would have to ssh as root on the server to do that.
>
> You could configure the ftp server to use high ports (> 1024) so ssh
> tunnel could be done as a normal user (the ftp-data port would be the port
> under the ftp port). Or if all else fails, ssh to server, ftp file to
> server, scp file back to you.
>
> --
> David Efflandt - All spam ignored http://www.de-srv.com/
> http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
> http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/



 
Reply With Quote
 
Nico Kadel-Garcia
Guest
Posts: n/a

 
      10-30-2003, 02:23 AM

"Richard Brandt" <(E-Mail Removed)> wrote in message
news:spjnb.44164$Tr4.92799@attbi_s03...
> I know there are problems with a ssh tunnel for the data channel. I was
> just trying to get the basics done and get a tunnel for the control
> connection with a functional passive yet unencrypted data channel.


Don't bother. Proceed directly to an entirely SSH solution, with chroot
cages if you need them to control user access to the server system, or go to
WebDAV (which is built into Apache these days and runs over SSL quite
nicely).


 
Reply With Quote
 
John Doe
Guest
Posts: n/a

 
      11-07-2003, 11:30 AM


Nico Kadel-Garcia wrote:
>
> "Richard Brandt" <(E-Mail Removed)> wrote in message
> news:spjnb.44164$Tr4.92799@attbi_s03...
> > I know there are problems with a ssh tunnel for the data channel. I was
> > just trying to get the basics done and get a tunnel for the control
> > connection with a functional passive yet unencrypted data channel.

>
> Don't bother. Proceed directly to an entirely SSH solution, with chroot
> cages if you need them to control user access to the server system, or go to
> WebDAV (which is built into Apache these days and runs over SSL quite
> nicely).


I used the tunnel approach in the past.

IIRC, need to rebuild the wu-ftpd package from the source code,
something like "./configure --disable-pasvip" before running make.

I have now also moved to an all ssh solution, as free ssh2 / sftp
clients are now more readily available.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
pure-ftpd and SuSE 11.1 Uwe Nass Linux Networking 0 08-06-2010 09:23 AM
ftpd - only users, not anonymous stravinskij Linux Networking 5 07-16-2007 06:27 PM
Newbie can't log into his own wu-ftpd server... ANTant@zimage.com Linux Networking 15 02-21-2005 12:39 AM
wu-ftpd & site exec & tar Magda Hewryk Linux Networking 0 10-16-2004 03:56 AM
pure-ftpd 1.0.17a problem ox Linux Networking 0 12-26-2003 12:22 AM



1 2 3 4 5 6 7 8 9 10 11