aboutsummaryrefslogtreecommitdiff
path: root/doc/git-annex-shell.mdwn
diff options
context:
space:
mode:
authorGravatar Antoine Beaupré <anarcat@debian.org>2016-04-04 16:33:02 -0400
committerGravatar Antoine Beaupré <anarcat@debian.org>2016-04-04 16:33:08 -0400
commitbf019ca1db87a419d8ede6b49b4022419cc6230d (patch)
treefec65186ae57c312e16c940676186178551e26c2 /doc/git-annex-shell.mdwn
parentb85f4e175598f43bf59901727af9167f7f1c15b1 (diff)
simplify manpage example and ask another question
sorry for the noise again...
Diffstat (limited to 'doc/git-annex-shell.mdwn')
-rw-r--r--doc/git-annex-shell.mdwn25
1 files changed, 10 insertions, 15 deletions
diff --git a/doc/git-annex-shell.mdwn b/doc/git-annex-shell.mdwn
index 502a1358a..ae696aec3 100644
--- a/doc/git-annex-shell.mdwn
+++ b/doc/git-annex-shell.mdwn
@@ -136,25 +136,20 @@ changed.
# EXAMPLES
-git-annex-shell(1) is usually called through a wrapper installed by the git-annex-assistant(1) in the `~/.ssh/authorized_keys` file on the remote host. To make such a setup manually, you will need the following wrapper installed in `~/.ssh/git-annex-shell`:
+git-annex-shell(1) is usually called through a wrapper installed by
+the git-annex-assistant(1) in the `~/.ssh/authorized_keys` file on the
+remote host. You can also do a similar setup by adding a specific
+line with a `command=` parameter to `~/.ssh/authorized_keys` by hand.
- #!/bin/sh
-
- set -e
- if [ "x$SSH_ORIGINAL_COMMAND" != "x" ]; then
- exec /usr/bin/git-annex-shell -c "$SSH_ORIGINAL_COMMAND"
- else
- exec /usr/bin/git-annex-shell -c "$@"
- fi
+For example, the following forces the key to be read-only, run only
+git-annex commands on the given directory:
-Then restrictions can be implemented to specific SSH keys using the
-`command=` parameter. For example, the following forces the key to be
-read-only, run only git-annex commands on the given directory:
-
- command="GIT_ANNEX_SHELL_DIRECTORY=/srv/annex GIT_ANNEX_SHELL_LIMITED=true GIT_ANNEX_SHELL_READONLY=true ~/.ssh/git-annex-shell",no-agent-forwarding,no-port-forwarding,no-X11-forwarding ssh-rsa AAAAB3NzaC1y[...] user@example.com
+ command="GIT_ANNEX_SHELL_DIRECTORY=/srv/annex GIT_ANNEX_SHELL_LIMITED=true GIT_ANNEX_SHELL_READONLY=true git-annex-shell -c \"$SSH_ORIGINAL_COMMAND\"",no-agent-forwarding,no-port-forwarding,no-X11-forwarding ssh-rsa AAAAB3NzaC1y[...] user@example.com
Obviously, `ssh-rsa AAAAB3NzaC1y[...] user@example.com` needs to
-replaced with your SSH key.
+replaced with your SSH key. The above also assumes `git-annex-shell`
+is availble in your `$PATH`, use an absolute path if it is not the
+case.
# SEE ALSO