I'm trying to restrict an SSH-tunnel user.
# sudo cat /home/user/.ssh/config
Banner none
ChrootDirectory /home/%u
PasswordAuthentication no
AllowTcpForwarding yes
X11Forwarding no
AllowAgentForwarding no
ForceCommand /bin/false
However, none of these seem to have any effect.
When I prepend /home/user/.ssh/authorized_keys with no-pty,no-agent-forwarding,no-X11-forwarding,command="/bin/false" it works, but I'd like to also include these directives into permanent configuration.
Is it possible to restrict a user this way without updating /etc/ssh/sshd_config?
UPDATE I know about Match User and Match Group; the point is to have this in a user-specific config.