I'm new to the forum so a big hi to you all. Anyways now onwards to my problem: I followed the following instruction Chrooted SSH/SFTP Tutorial (Debian Etch) and was able to create a chrooted ssh connection. However as soon as I added these lines to sshd_config I was not able to connect to SSH but was able to connect with SFTP:
Match User tstuser
ChrootDirectory /home/cage/ or /home/cage/home or /home/cage/home/tstuser
I have tried about anything and did hours of reading on the internet (also this forum), but came up with no solution for my problem. The problem is as soon as I add the ChrootDirectory Directive my ssh and sftp connection both stop working when logging in. As soon as I use the last ChrootDirectory directive (/home/cage/home/tstuser) then I can login using sftp but can't login using ssh. I've also set the sftp server to internal but no difference.
What am I missing here? I can't seem to get it right. I hope someone experienced a similar problem and found a solution. Any help is welcome. I used a script to create the chroot environment following the instructions.