Anyshere’s Remote-SSH and Dev Containers do not seem to work together. However, Microsoft’s versions seem to work.
Steps to Reproduce
On my Mac, I used Anyshere’s Remote-SSH to ssh into my Linux. Afterwards, I selected Dev Containers: Open Folder in Container. However, it kept calling “docker info” on my Mac instead of the Linux.
Expected Behavior
This should use Remote-SSH to connect to the Linux’s Dev Container.
Thank you for your question. We do support connecting to Docker over SSH. We will log if Docker is not found locally, but that shouldn’t affect connecting to a container over SSH.
If you have a devcontainer.json file in you repo, you can attach via the command palette – cmd-shift-p, then “Dev Containers: Reopen in Container”.
Thank you Ravi for the quick response, really appreciate it. I am able to start the container manually, and then “Attach to Running Container”.
However, I was told by the author of our ai-dynamo/dynamo/.devcontainer/devcontainer.json to make sure to “Open Folder in Container” instead of “Attach to Running Container” because DevContainer does a bunch of stuff when setting it up thats not happening when I just run it manually.
Would you know why “Open Folder in Container” does not work? Here are more screenshots, if it helps.
Hi @keivenchang, could you try first opening the folder on the SSH host, and then use the “Reopen in Container” command? The reopen command works over SSH and will prompt you to select a devcontainer.json file.
We are working on an update to make the “Open Folder in Container” work when connected over SSH.
So I couldn’t find “Reopen in Container” but I did actually see “Open Folder in Container” and it started executing the following for several minutes:
2025-06-16 15:32:32.858 [info] Reading devcontainer config remotely with command: read-configuration --workspace-folder /home/keivenc/dynamo --config /home/keivenc/dynamo/.devcontainer/devcontainer.json
2025-06-16 15:32:32.858 [info] Running devcontainer CLI command: /tmp/devcontainer-cli-c4d52210-e1bc-4a74-91b3-cf8d9ca278fb/cli/dist/spec-node/devContainersSpecCLI.js read-configuration --workspace-folder /home/keivenc/dynamo --config /home/keivenc/dynamo/.devcontainer/devcontainer.json
...
...
2025-06-16 15:37:44.960 [info] Registering label formatter for dev-container*
2025-06-16 15:37:44.974 [info] SSH_AUTH_SOCK not set; not forwarding SSH agent socket
2025-06-16 15:37:44.974 [info] Forwarding exec server locally via tcpForward method
2025-06-16 15:37:44.975 [info] Forwarding 127.0.0.1:40663 to 127.0.0.1:0 for container f73933c9c330430532c9625edd174897ab2bc51767e66d928ae1a0fa44390cd2
2025-06-16 15:37:44.992 [info] forwarderProcess stdout: forwarder: Forwarding (remote) 127.0.0.1:40663 to (local) 127.0.0.1:0 for container f73933c9c330430532c9625edd174897ab2bc51767e66d928ae1a0fa44390cd2
Note that in-between last week and now, I exported this environment on my Mac DOCKER_HOST=tcp://mylinuxhost:myport in order to execute Docker commands from my Mac. I’m not sure if that actually made a difference. At any rate, I think it’s doing the right thing. Thank you for your help.