I set up chrooted SFTP directories on a RHEL 8 server that also has several websites running on it. When I tried to ssh in this morning, the server said it only accepts SFTP connections. Fortunately, it's a VM so I can connect directly to the console.
Here's what I added to sshd_config
on Friday:
ForceCommand internal-sftp
Match Group sftpusers
ChrootDirectory /sftp/%u
Commenting out the ForceCommand
line gets me back in via ssh. What's the correct directive to constrain SFTP users to a directory without turning the entire server into an SFTP server?