Created attachment 1336 [details] ChrootDirectory for core OpenSSH This patch adds a ChrootDirectory option to optionally specify a directory to chroot(2) to after authentication in sshd.
Created attachment 1337 [details] ChrootDirectory for portable OpenSSH
BTW this patch is intended for use with the recent "Match" sshd_config directive. For example: Match group chroot_users ChrootDirectory /home/chroot/%u
A newer version of this patch has just been committed, with additional support for an in-process sftp-server to avoid the need to configure the chroot with support files. This will be in openssh-4.8.
Fix shipped in 4.9/4.9p1 release.