From 6d6ba4725a8463a8301be47556cb367fe69c14f9 Mon Sep 17 00:00:00 2001 From: Lorenzo Pizzari Date: Wed, 8 Mar 2017 23:41:39 +0100 Subject: [PATCH 1/2] Missing ssh tunnel option I've tried to connect with ssh tunnel and i found that the port option is missing. Added option to doc. --- docker-for-azure/deploy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-for-azure/deploy.md b/docker-for-azure/deploy.md index 6e50a19713..dac070f365 100644 --- a/docker-for-azure/deploy.md +++ b/docker-for-azure/deploy.md @@ -43,7 +43,7 @@ Once you are logged into the container you can run Docker commands on the swarm: You can also tunnel the Docker socket over SSH to remotely run commands on the cluster (requires [OpenSSH 6.7](https://lwn.net/Articles/609321/) or later): - $ ssh -NL localhost:2374:/var/run/docker.sock docker@ & + $ ssh -p -NL localhost:2374:/var/run/docker.sock docker@ & $ docker -H localhost:2374 info If you don't want to pass `-H` when using the tunnel, you can set the `DOCKER_HOST` environment variable to point to the localhost tunnel opening. From 4cdbda9d10c32a707c5757f84a972ff10de5369f Mon Sep 17 00:00:00 2001 From: Lorenzo Pizzari Date: Thu, 9 Mar 2017 00:20:38 +0100 Subject: [PATCH 2/2] Added -f and -i from @nathanleclaire suggestion, added the `-f` option and removed `&` Added `-i ` just to be coherent with previous ssh command --- docker-for-azure/deploy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-for-azure/deploy.md b/docker-for-azure/deploy.md index dac070f365..4a806ff998 100644 --- a/docker-for-azure/deploy.md +++ b/docker-for-azure/deploy.md @@ -43,7 +43,7 @@ Once you are logged into the container you can run Docker commands on the swarm: You can also tunnel the Docker socket over SSH to remotely run commands on the cluster (requires [OpenSSH 6.7](https://lwn.net/Articles/609321/) or later): - $ ssh -p -NL localhost:2374:/var/run/docker.sock docker@ & + $ ssh -i -p -fNL localhost:2374:/var/run/docker.sock docker@ $ docker -H localhost:2374 info If you don't want to pass `-H` when using the tunnel, you can set the `DOCKER_HOST` environment variable to point to the localhost tunnel opening.