Search code examples
sshssh-keysopenssh

SSH forced command parameters


I'm attempting to write a script that verifies user permissions after a successful ssh login.

I'm doing this through an SSH forced command. I'd like to pass the script parameters (such as the user it is authenticating) but I'm not sure how I would do that.

Any help?


Solution

  • I figured this out on my own. You can pass parameters to the forced command script by setting environment variables and reading them in in the forced command script.