Chroot SFTP home dir
By Iain Cuthbertson
Example user ‘iain’
sudo mkdir -p /chroot/iain/home/iain
sudo useradd -M -d /home/iain iain
sudo passwd iain
sudo chwon iain: /chroot/iain/home/iain
sudo nano -w /etc/ssh/sshd_config
# At the end of the file, add:
Match User paypoint
ChrootDirectory /chroot/iain
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp
sudo /etc/init.d/ssh restart