I'm creating users in my system, which are chroot jailed to their own home directory only using ‘/etc/ssh/sshd_config‘. It works fine, but I want to make it so ChrootDirectory will make their home directory to /home/%u/%u or /home/%u/public.
I have tried both, but it seems to always deny the connection when doing so and connecting using a FTP client as FlashFXP or FileZilla (/home/%u works).
Permissions are fine, as I am able to access the sub-directory when it's set to ‘ChrootDirectory /home/%u‘. What am I doing wrong then?