sftp with chroot?

Discussion in 'Server Operation' started by eugeneapolinary80, Aug 1, 2009.

  1. eugeneapolinary80

    eugeneapolinary80 New Member

    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
     
  2. falko

    falko Super Moderator ISPConfig Developer

Share This Page