So, most of this is based on the ability to specify the command that the user is <i>forced</i> to run in authorized_keys to be a wrapper command that you wrote. This wrapper command reads its arguments and then will execve git shell as appropriate.<p>What's important to note is that this <i>also</i> talks about SSH_ORIGINAL_COMMAND, which is the environment variable set by sshd when invoking the forced command that is specified in authorized_keys.<p>Clever hack.