Skip to content

Instantly share code, notes, and snippets.

@sdrew
Created February 17, 2015 07:23
Show Gist options
  • Save sdrew/d6a582709bce16c46b30 to your computer and use it in GitHub Desktop.
Save sdrew/d6a582709bce16c46b30 to your computer and use it in GitHub Desktop.
Ubuntu SFTP CHROOT
https://en.wikibooks.org/wiki/OpenSSH/Cookbook/SFTP
Subsystem sftp internal-sftp
Match Group sftp-users
ChrootDirectory /home
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp -d %u
groupadd --system sftp-users
useradd -m username -g sftp-users -s /bin/false
or
gpasswd --add sftp-users username
cat /etc/group
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment