This project aims to provide a working solution for home directory-jailed SFTP using OpenSSH-server's internal-sftp subsystem and automount(8).
See mle86.github.io/sftp-chroot for more information on how this project was built.
- Simple installation script
- Regular SSH logins are not affected
sftpgroup members can use SFTP onlysftpgroup members can only access their own home directories- Lightweight chroot'ing (without /dev etc.)
- SFTP
pwdshows correct path names - No additional per-user configuration needed
Since this solution uses the internal-sftp subsystem, only SFTP connections are supported, but SCP or rsync won't work.
Run sudo ./install.sh.
This is what it will do:
apt-get install autofs,- copy
autofs-sftp-jails.shto/etc/, - copy
jails.autofsto/etc/auto.master.d/, - create a new
sftpuser group, - append
sshd_config.addto/etc/ssh/sshd_config.
Every operation will ask for manual confirmation (y) first,
so you can skip steps with n
or abort the entire installation process at any time with Ctrl-C.
Maximilian Eul <[email protected]>