I have a home web server using SSH on a custom port. I've found that if I go to
sftp://domainname.tld:port my whole filesystem is visible, and anybody can download any file. I'd like to chroot this to my
public_html directory, but my additions don't seem to be making any difference after restarting the service. My additions in sshd_config are as follows:
Subsystem sftp /usr/lib/openssh/sftp-server Subsystem sftp internal-sftp ChrootDirectory /path/public_html/ ForceCommand internal-sftp AllowTcpForwarding no
A link to where I can read up on the documentation for SSH configurations would also be very appreciated.
EDIT: I accidentally left out an important piece of information (I think). I'm talking about when someone visits
sftp://domainname.tld:port in a web browser, not with an SFTP program. I'm getting this behavior from Firefox on Linux Mint.