I’ve currently written a script that verifies permissions and I’d like to run it as a forced command for SSH when users ssh into the machine.
However, it appears that SSH requires you to specifically identify the forced command to run for each individual rsa-key.
Is there a way to tell SSH to use the script as the default forced command for all users?
It doesn’t appear that SSH lets you do this in a general way. You may need to leverage different parts of the Unix login process. You could make your script part of the system’s shell initialization or, much better, have PAM do this work for you using something like pam_script.