I’m having a problem with my sshd config. I want to limit all users of the group www-user to sftp use. All of them but the user yorunokoe.
I saw that related question : How to exclude from a "Match Group" in SSHD? and my config end like this :
Match Group www-user User !yorunokoe ChrootDirectory %h ForceCommand internal-sftp AllowTcpForwarding no PermitTunnel no X11Forwarding no But that doesn’t work. I tested different variations and it seems that everytime I use the exclamation mark, the whole directive returns as false and no subsequent config is applied. With the above config, all users still have SSH access, they’re not chrooted and they’re not limited to sftp.
I’m running with OpenSSH_6.7p1 Debian-5+deb8u2, OpenSSL 1.0.1k
What am I doing wrong ?
User *,!yorunokoe. See this question for a more thorough explanation.