Talk:Sshd

 AllowUsers sampleuser sampleftpuser sampletunnel

Subsystem sftp internal-sftp

Match User sampletunnel ForceCommand /usr/local/bin/rsync

Match User sampleftpuser ChrootDirectory /home/sampleftpuser X11Forwarding no AllowTcpForwarding no PermitTunnel no ForceCommand internal-sftp

Should have everything needed. Pubkey Auth and also 3 example users who are able to connect with their corresponding keys.

One can login (sampleuser), one is intend to be used for rsync (sampletunnel) and finally the sampleftpuser can use SFTP.

Doesn't matter if more users exist and even if they've valid keys, logins will be denied. 