TecAdmin published a tutorial about how to create SFTP only user in Debian 11.
How to Create SFTP Only User in Debian 11
SFTP (SSH File Transfer Protocol) is a secure file protocol used to access, manage, and transfer files over an encrypted SSH transport session. Security first is a thumb rule for the system administrators. In some cases, we need to allow remote users to access the filesystem on our system, but you don’t want to allow shell access.