Use Match in sshd_config to detect SCP connection
- by Garreth McDaid
I use the following directive in sshd_config to detect if the user trying to login to a server is called developer, and issue a bash script to the user if that is the case:
Match User developer
ForceCommand /bin/dev_login
However, when the user tries to upload a file using SCP, they can't, as the dev_login script is interrupting the process.
Is it possible to use the
Match
directive to detect if the connection is SCP rather than a request to open a shell?