View previous topic :: View next topic |
Author |
Message |
EstebanGonzales n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 14 Oct 2010 Posts: 8
|
Posted: Sat Oct 16, 2010 9:59 pm Post subject: How to jail the sftp users to home directorys ? |
|
|
Hi im looking to Install a Secure FTP Server on one of my systems/
Can anyone reccomend a good one to use ?
I need to be able to upload files to the server from remote locations mostly for windows users and some linux.
I need one that is fairly easy to use.
Thanks ![Very Happy :D](images/smiles/icon_biggrin.gif)
Last edited by EstebanGonzales on Sun Oct 17, 2010 10:39 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
TJNII l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/17238683193fdc0165daf7f.gif)
Joined: 09 Nov 2003 Posts: 648 Location: for(;;);
|
Posted: Sat Oct 16, 2010 10:51 pm Post subject: |
|
|
Enable SFTP support in ssh.
Uncomment the following line in your sshd_config file:
Code: | Subsystem sftp /usr/lib/misc/sftp-server |
If memory serves the clients I use are sftp for Linux and win-scp for Windows. I haven't used it in a while, though. This rides on top of ssh, so you don't need to forward anything other than your ssh port.
Don't use old-school FTP. Clear text passwords are bad, mmmkay? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
EstebanGonzales n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 14 Oct 2010 Posts: 8
|
Posted: Sat Oct 16, 2010 11:33 pm Post subject: |
|
|
Ok excellent thanks I will give this ago.
Is there any important things I need to no when enabling this ?
Can i make the users chrooted into there own www directorys so they can not move around the Server ?
If so how would i go about doing this ?
Cheers |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
TJNII l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/17238683193fdc0165daf7f.gif)
Joined: 09 Nov 2003 Posts: 648 Location: for(;;);
|
Posted: Sun Oct 17, 2010 4:13 pm Post subject: |
|
|
If you want to chroot and jail the users vsftpd may be better as I don't think sftp can do that. vsftpd is plain ftp so it does have the issue of clear text passwords, but you should be able to encrypt it to mitigate that problem. I believe vsftpd is programmed with what you want to do in mind, so look into that.
I can't offer specific advice beyond that, I've only used vsftpd to set up a very basic FTP server to push drivers into EFI. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
EstebanGonzales n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 14 Oct 2010 Posts: 8
|
Posted: Sun Oct 17, 2010 5:21 pm Post subject: |
|
|
Im looking to do it through shh i no it can be done but now sure how to set it up . |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ant P. Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sun Oct 17, 2010 8:03 pm Post subject: |
|
|
You want ChrootDirectory. man sshd_config. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
EstebanGonzales n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 14 Oct 2010 Posts: 8
|
Posted: Mon Oct 18, 2010 6:44 pm Post subject: |
|
|
Ok thanks for your reply but the man file doesnt reall explaine at all how to set this up. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ant P. Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Mon Oct 18, 2010 9:19 pm Post subject: |
|
|
Code: | Match User sftpuser*
ChrootDirectory /home/%u
ForceCommand internal-sftp
|
etc. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Goverp Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/152613747847c6fd276c31a.jpg)
Joined: 07 Mar 2007 Posts: 2204
|
Posted: Tue Oct 19, 2010 8:38 am Post subject: FTP and SFTP are very different internally |
|
|
TJNII wrote: | If you want to chroot and jail the users vsftpd may be better as I don't think sftp can do that. vsftpd is plain ftp so it does have the issue of clear text passwords, but you should be able to encrypt it to mitigate that problem. I believe vsftpd is programmed with what you want to do in mind, so look into that. ...EFI. |
Sadly, it's not at all easy to add encryption to a straight FTP implementation. SFTP uses a completely different approach to provide a secure connection.
What this means is that vsftp is not suitable if you want a secure connection; where it is useful is when you want to offer plain FTP with decent control on what clients can do. If you want a secure connection, you need SFTP. _________________ Greybeard |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
EstebanGonzales n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 14 Oct 2010 Posts: 8
|
Posted: Tue Oct 19, 2010 10:47 am Post subject: |
|
|
Sftp is what i need and is what I have at the moment.
What im trying to do is jail the users but having extreme problems doing this |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
py-ro Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/1714555094ed55010ccff6.jpg)
Joined: 24 Sep 2002 Posts: 1734 Location: Velbert
|
Posted: Tue Oct 19, 2010 1:49 pm Post subject: |
|
|
You can simply use proftpd with mod_sftp. But, either ssh or sftp must change its port.
Py |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|