Skip to content

Instantly share code, notes, and snippets.

@jhass jhass/.ssh_authorized_keys
Last active May 17, 2019

Embed
What would you like to do?
Git shell only for specific SSH key
command="/home/USER/.ssh/git-shell",no-port-forwarding,no-X11-forwarding,no-pty ssh-rsa YOUR_KEY foo
#!/bin/sh
if [ -z "$SSH_ORIGINAL_COMMAND" ]; then
exec /usr/bin/git-shell
else
exec /usr/bin/git-shell -c "$SSH_ORIGINAL_COMMAND"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.