I have a host on which I created a script .
The script is being executed whenever the user is logging in via ssh bashrc launches the script.
Now I'm trying to get the script to execute even if the user is not actually logging in , and just running a command . For example I want the script to be executed if a user is running the following :
ssh [email protected] some_command
Is there a way to achieve the above?
sshnot only when the user logs in.