Restrict ssh/sFTP website accounts to their directories

I am hosting a few websites with CyberPanel, and I have noticed that if I give my users a ssh/sFTP account (created using the “SET UP SSH ACCESS” feature), they can browse all of my server’s folders. Is there a way to restrict those accounts to their directories?

I’ve tried adding ChrootDirectory %h in my /etc/ssh/sshd_config, but then I couldn’t login at all :slight_smile:

Does anyone have a setup where they have made a chroot jail folder (user directory) for both ssh and FTP.
Because sometimes you need to make a user have access to a subdomain from another user. (If they don’t have their own domain)