I was using ssh's "forcecommand" option to pass a shell script that would help lock out users from ssh. I was wondering if their was a way to do this without forcing root to have to execute the shell script as well.
sshd allows us to override default settings for selected user (User, Group, Host or Address).
We can accompilsh this using
I don't know if it is possible to unset option in
Config with unset option:
Config with restricted group:
More info about