Linode Forum Index Linode Forum
Linode Community Forums
 


SFTP Jails Not Working Correctly Under Ubuntu 10.04

Click here to go to the original topic

 
       Linode Forum Index -> Linux Networking
Author Message
davidlougheed



Joined: 24 Jan 2012
Posts: 2
Location: Canada

Posted: Tue Jan 24, 2012 8:57 pm    Post subject: SFTP Jails Not Working Correctly Under Ubuntu 10.04  

I am trying to create a filetransfer group with several users under it, and successfully do so. However, whenever I enable

Code:
Match group filetransfer
       ChrootDirectory %h
       X11Forwarding no
       AllowTcpForwarding yes
       ForceCommand internal-sftp


and try to connect with FileZilla, it spits out this error:

Quote: Error: Connection reset by peer
Error: Could not connect to server

Is there any reason that it should block me, or is it a problem with FileZilla?[/quote][/code]
Back to top  
sweh



Joined: 13 Apr 2004
Posts: 565

Posted: Tue Jan 24, 2012 9:51 pm    Post subject:  

Run the daemon in debug mode, possibly on a different port, and then try to ssh as a test user on that port.

eg Code: /usr/sbin/sshd -ddd -p 2222

And then in another window
Code: ssh testuser@localhost -p 2222

You should see the reason for the error
Back to top  
sweh



Joined: 13 Apr 2004
Posts: 565

Posted: Tue Jan 24, 2012 10:00 pm    Post subject:  

PS: http://www.debian-administration.org/articles/590 might help
Back to top  
theckman



Joined: 27 Nov 2010
Posts: 45

Posted: Tue Jan 24, 2012 10:03 pm    Post subject: Re: SFTP Jails Not Working Correctly Under Ubuntu 10.04  

Are you folder/file permissions correct? Can you provide the output of the following commands:

ls -lA /home
ls -lA /home/<jailed_user>

-Tim
Back to top  
davidlougheed



Joined: 24 Jan 2012
Posts: 2
Location: Canada

Posted: Fri Jan 27, 2012 1:52 pm    Post subject: Solved It.  

Thanks sweh, I ran it in debug mode and my permissions were screwed up. :D
Back to top  
 
       Linode Forum Index -> Linux Networking
Page 1 of 1