If the user account is only supposed to have file transfer capabilities/no shell access, add it a to a specific group e.g. `sftponly`, and only allow this group to use the `internal-sftp` command in `/etc/ssh/sshd_config`
Match Group sftponly
ForceCommand internal-sftp -l INFO -f LOCAL6
AllowTcpForwarding no
AllowAgentForwarding no
GatewayPorts no
X11Forwarding no