summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar http://olivier.mehani.name/ <olivier-mehani@web>2014-07-09 01:09:33 +0000
committerGravatar admin <admin@branchable.com>2014-07-09 01:09:33 +0000
commitfaa23efd6ce9ab4d1a4f9249f0d02d46feb6ed34 (patch)
tree35b119ae880a4e718cf457d3acfe30aa0169a280
parentaf93ce0bf1cb573b1f28e11b0ba3b567e2e3a964 (diff)
Added a comment
-rw-r--r--doc/todo/wishlist__91__webapp__93__:_add_an_option_to_install__SSH_key_on_remote/comment_4_9e8fdc41fdefcb8be0d6bae7cd4a04a9._comment59
1 files changed, 59 insertions, 0 deletions
diff --git a/doc/todo/wishlist__91__webapp__93__:_add_an_option_to_install__SSH_key_on_remote/comment_4_9e8fdc41fdefcb8be0d6bae7cd4a04a9._comment b/doc/todo/wishlist__91__webapp__93__:_add_an_option_to_install__SSH_key_on_remote/comment_4_9e8fdc41fdefcb8be0d6bae7cd4a04a9._comment
new file mode 100644
index 000000000..06d16239a
--- /dev/null
+++ b/doc/todo/wishlist__91__webapp__93__:_add_an_option_to_install__SSH_key_on_remote/comment_4_9e8fdc41fdefcb8be0d6bae7cd4a04a9._comment
@@ -0,0 +1,59 @@
+[[!comment format=mdwn
+ username="http://olivier.mehani.name/"
+ nickname="olivier-mehani"
+ subject="comment 4"
+ date="2014-07-09T01:09:33Z"
+ content="""
+And the ultimate, copy/pastable one, using shell variables:
+
+ export GASERVER=server
+ export GAUSER=user
+ export GAPATH=/path
+
+For the new client (using bash):
+
+ export GASANEPATH=${GAPATH//\//.2F}
+ export GASSHHOSTNAME=${GASERVER}-${GAUSER}_${GASANEPATH}
+ ssh-keygen -t rsa -f ~/.ssh/git-annex/key.git-annex-$GASSHHOSTNAME
+ cat << EOF >> ~/.ssh/config
+ # Added manually for git-annex
+ Host git-annex-$GASSHHOSTNAME
+ Hostname $GASERVER
+ IdentityFile ~/.ssh/git-annex/key.git-annex-$GASSHHOSTNAME
+ IdentitiesOnly yes
+ StrictHostKeyChecking yes
+ EOF
+ ssh-copy-id -i ~/.ssh/git-annex/key.git-annex-$GASSHHOSTNAME $GAUSER@$GASERVER
+ git remote add ${GASERVER/.*/} ssh://${GAUSER}@git-annex-${GASSHHOSTNAME}${GAPATH}
+ git config remote.${GASERVER/.*/}.annex-ignore false
+
+After the `ssh-copy-id` stage, the key can be used to get a full session. This
+needs to be limited on the server, by prepending the following to the newly
+added key in `.ssh/authorized_keys`, replacing `GAPATH` by the value of `$GAPATH`:
+
+ command=\"GIT_ANNEX_SHELL_DIRECTORY='GAPATH' ~/.ssh/git-annex-shell\",no-agent-forwarding,no-port-forwarding,no-X11-forwarding,no-pty
+
+From the client, one can make sure this has been limite properly by trying to log in with the key:
+
+ ssh -i ~/.ssh/git-annex/key.git-annex-$GASSHHOSTNAME $GAUSER@$GASERVER -o IdentitiesOnly=yes
+
+It should reply with the `git-annex-shell` helper complaing:
+
+ git-annex-shell: bad parameters
+
+ Usage: git-annex-shell [-c] command [parameters ...] [option ...]
+
+ Plumbing commands:
+
+ commit DIRECTORY commits any staged changes to the git-annex branch
+ configlist DIRECTORY outputs relevant git configuration
+ dropkey DIRECTORY KEY ... drops annexed content for specified keys
+ gcryptsetup DIRECTORY VALUE sets up gcrypt repository
+ inannex DIRECTORY KEY ... checks if keys are present in the annex
+ notifychanges DIRECTORY sends notification when git refs are changed
+ recvkey DIRECTORY KEY runs rsync in server mode to receive content
+ sendkey DIRECTORY KEY runs rsync in server mode to send content
+ transferinfo DIRECTORY KEY updates sender on number of bytes of content received
+
+... and this should be all set.
+"""]]