(via www.debian-administration.org)
The upcoming version of OpenSSH (4.8p1 for the GNU/Linux port) features a new configuration option : ChrootDirectory. This has been made possible by a new SFTP subsystem statically linked to sshd.
The upcoming version of OpenSSH (4.8p1 for the GNU/Linux port) features a new configuration option : ChrootDirectory. This has been made possible by a new SFTP subsystem statically linked to sshd.
Comments
If latest install of openssh-server comes up with "Could not load host key: /etc/ssh/ssh_host_ed25519_key" when starting, then create the file via:
ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N ''
Setup bind mounted directory, to give access to certain folders outside of the chroot path. Example:
mount --bind /var/www/html/htdocs/some/fold er /home/chroot/username/some/fol der
To mount on boot, edit /etc/fstab:
/var/www/html/htdocs/some/fold er /home/chroot/username/some/fol der none defaults,bind 0 0