PDA

View Full Version : sftp with chroot?


eugeneapolinary80
2nd August 2009, 01:01
Hi

os: Debian Lenny 64bit

I want to make an sftp server....

- Only an sftp server
- Some users may log in by ssh (with openssh-server), some users can only use sftp
- Important! - Chroot! Users using sftp must only see e.g.: their home directory, or better: a folder in it.
- Under Debian Lenny

Is there any good, secure solution? At least links to howtos? :S

I tried:
--------------------
#!/bin/bash

apt-get install scponly
dpkg-reconfigure scponly # Select: Yes
cd /usr/share/doc/scponly/setup_chroot
gunzip setup_chroot.sh.gz
sh setup_chroot.sh # Just use default settings
--------------------

Ok, now I:

echo "">/var/log/auth.log

Then try to log in:

sftp scponly@localhost

"Connection closed."...

log:
http://pastebin.com/fbc34c01


Why doesn't it work?

p.s.: Yes, I copied the sftpd-server to /home/scponly/usr/lib/sftpd-server

is it a bug? :(

Thank you