Please check the screenshots and let me know my mistake. I don’t think I have made any.
Thank you for reporting this. One issue that is visible in these screenshots is you used
ChrootDirectory %h which means it will use user’s home directory as chroot directory but I beleieve in the question you were asked to use some other chroot directory also you should have enabled password authentication as well. So it was supposed to be failed.
Can you please explain what I had to do enable password authentication. Also, there was nothing mentioned related to chroot directory.