NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

sftp on chroot


I'm a pair of users in a public server, currently using ftp.
Now, i want to let use sftp on chroot, and have more control in the auth.
I have the next config in my /etc/ssh/sshd_config

Subsystem       sftp    internal-sftp
Match group sftponly
        ChrootDirectory /home
        X11Forwarding no
        AllowTcpForwarding no
        ForceCommand internal-sftp

When try to connect via sftp to the server  using the user "xxx" under
the group "sftponly" it connect fine, but it show the /home partition,
let me browsing all user content.

if  you change the line:  ChrootDirectory /home/%u  then, it don't connect

What are happening ? it necessary do :

% chroot /home

Or define a alternative partition (/chroot/home/userx  example) for my users ?


Francisco Valladolid H.
 -- - Jesus Christ follower.

Home | Main Index | Thread Index | Old Index