Is it possible to run a git server over ssh, using authorized_keys
and command=
to restrict access to only the git repositories, without using gitosis/
You can put this at the beginning of each line in authorized_keys2
:
no-port-forwarding,no-agent-forwarding,command="/usr/bin/git-shell -c \"$SSH_ORIGINAL_COMMAND\""
That'll allow only git commands over ssh, but will still let you become that user if you need to mess around (from another account):
sudo -u git -i