See sshd_config(5).
/etc/ssh/sshd_config.Subsystem sftp internal-sftpaddgroup sftp-onlyadduser --shell /usr/sbin/nologin --no-create-home --add_extra_groups sftp-only myusermkdir -p /home/myuser/incomingchown root:root /home/myuserchown myuser:myuser /home/myuser/incomingMatch Group sftp-only
ChrootDirectory %h
AllowTCPForwarding no
X11Forwarding no
ForceCommand internal-sftp
Finally: systemctl restart sshd
internal-sftp and sftp-server?Subsystem sftp /usr/lib/openssh/sftp-server
Subsystem sftp internal-sftp
internal-sftp is newer, and requires no support files when used with ChrootDirectory.
Generally, use internal-sftp.
/home/myuser instead of /home/myuser/incoming?No, there’s no elegant way to do this with OpenSSH-based SFTP servers.