https://github.com/mle86/sftp-chroot
Working homedir-jailed SFTP – https://mle86.github.io/sftp-chroot/
https://github.com/mle86/sftp-chroot
autofs chroot internal-sftp jail scp sftp ssh sshd
Last synced: 7 months ago
JSON representation
Working homedir-jailed SFTP – https://mle86.github.io/sftp-chroot/
- Host: GitHub
- URL: https://github.com/mle86/sftp-chroot
- Owner: mle86
- Created: 2016-06-01T22:20:01.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-23T12:34:38.000Z (over 8 years ago)
- Last Synced: 2025-01-14T15:23:29.886Z (9 months ago)
- Topics: autofs, chroot, internal-sftp, jail, scp, sftp, ssh, sshd
- Language: Shell
- Homepage:
- Size: 104 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
Awesome Lists containing this project
README
# sftp-chroot
This project aims to provide a working solution
for home directory-jailed SFTP
using OpenSSH-server's **internal-sftp** subsystem
and **automount**(8).## Project page
See
[**mle86.github.io/sftp-chroot**](http://mle86.github.io/sftp-chroot/)
for more information
on how this project was built.## Features
* Simple installation script
* Regular SSH logins are not affected
* `sftp` group members can use SFTP only
* `sftp` group members can only access their own home directories
* Lightweight chroot'ing (without */dev* etc.)
* SFTP `pwd` shows correct path names
* No additional per-user configuration needed## Limitations
Since this solution uses the *internal-sftp* subsystem,
only SFTP connections are supported,
but SCP or rsync won't work.## Installation
Run `sudo `[`./install.sh`](install.sh).
This is what it will do:* `apt-get install autofs`,
* copy [`autofs-sftp-jails.sh`](autofs-sftp-jails.sh) to `/etc/`,
* copy [`jails.autofs`](jails.autofs) to `/etc/auto.master.d/`,
* create a new `sftp` user group,
* append [`sshd_config.add`](sshd_config.add) to `/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.## Author
Maximilian Eul
\https://github.com/mle86/