Skip to content
This repository has been archived by the owner on Oct 19, 2022. It is now read-only.

ssh-agent possible? #39

Open
xelra opened this issue Oct 2, 2017 · 3 comments
Open

ssh-agent possible? #39

xelra opened this issue Oct 2, 2017 · 3 comments

Comments

@xelra
Copy link

xelra commented Oct 2, 2017

Is it possible to use an ssh-agent that runs on the host system?

@h0tbird
Copy link

h0tbird commented Aug 30, 2018

Perhaps defining a user at volume creation time -o SshAuthUser=myuser. And reading that user's $SSH_AUTH_SOCK at mount time? Does that make any sense @vieux ?

@h0tbird
Copy link

h0tbird commented Sep 3, 2018

Changing the config.json like this:

diff --git a/config.json b/config.json
index e396ffa..9f1009d 100644
--- a/config.json
+++ b/config.json
@@ -11,6 +11,13 @@
         "value"
       ],
       "value": "0"
+    },
+    {
+      "name": "SSH_AUTH_SOCK",
+      "settable": [
+        "value"
+      ],
+      "value": ""
     }
   ],
   "interface": {
@@ -53,6 +60,18 @@
         "source"
       ],
       "type": "bind"
+    },
+    {
+      "destination": "/tmp/sshauthsock",
+      "options": [
+        "rbind"
+      ],
+      "name": "sshauthsock",
+      "source": "",
+      "settable": [
+        "source"
+      ],
+      "type": "bind"
     }
   ],
   "network": {

...I am able to do stuff like this:

docker plugin disable h0tbird/sshfs
docker plugin set h0tbird/sshfs SSH_AUTH_SOCK=/tmp/sshauthsock/$(basename ${SSH_AUTH_SOCK}) sshauthsock.source=$(dirname ${SSH_AUTH_SOCK})
docker plugin enable h0tbird/sshfs
docker volume create -d h0tbird/sshfs -o sshcmd=${RUSER}@localhost:${RMOUNT} -o port=2222 -o workaround=rename mydata

@h0tbird
Copy link

h0tbird commented Dec 7, 2018

Related PR: #66

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants