Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to container with ssh unless SSH key is in a running SSH agent #2019

Open
marcpawl opened this issue Dec 12, 2019 · 8 comments
Assignees
Labels
containers Issue in vscode-remote containers upstream Issue identified as 'upstream' component related (exists outside of VS Code Remote)

Comments

@marcpawl
Copy link

Issue Type: Bug

[2019-12-12 18:29:48.396] [renderer1] [error] connect ENOENT \.\pipe\openssh-ssh-agent: Error: connect ENOENT \.\pipe\openssh-ssh-agent
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1054:14)

Connection works in cmd and powershell

C:\Users\mpawlowsky\dcrdev\remote>echo %DOCKER_HOST%
ssh://mpawlowsky@dcrdev

C:\Users\mpawlowsky\dcrdev\remote>docker exec rhel72_64 ls /hotel
1002
u1002

C:\Users\mpawlowsky\dcrdev\remote>

Extension version: 0.94.0
VS Code version: Code - Insiders 1.41.0-insider (9579eda04fdb3a9bba2750f15193e5fafe16b959, 2019-12-10T21:44:16.632Z)
OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz (4 x 3312)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.89GB (6.75GB free)
Process Argv
Screen Reader no
VM 0%
@marcpawl
Copy link
Author

contents of settings.json
{
"docker.host":"ssh://mpawlowsky@dcrdev"
}

@marcpawl
Copy link
Author

Extension Author (truncated) Version
vscode-test-explorer hbe 2.15.0
vscode-catch2-test-adapter mat 2.7.8
remote-containers ms- 0.94.0
remote-ssh ms- 0.48.0
remote-ssh-edit ms- 0.48.0
remote-ssh-explorer ms- 0.48.0
remote-wsl ms- 0.41.5
vscode-remote-extensionpack ms- 0.17.0
cmake-tools ms- 1.2.3
cpptools ms- 0.26.2

@marcpawl
Copy link
Author

Documentation issue for windows.
OpenSSH Authentification Agent has to be running.
ssh-add must be called.
Then start code-insiders.

Even if the client keys are installed, without ssh-agent running the connection to the remote container will not succeed.

@chrmarti
Copy link
Contributor

@Chuxel Could we add (or reference) this to the documentation about connecting via ssh://? I see it in the section about using SSH inside the container and the FAQ, but not in the ssh:// section.

@chrmarti chrmarti added doc containers Issue in vscode-remote containers labels Dec 16, 2019
@Chuxel
Copy link
Member

Chuxel commented Dec 16, 2019

@chrmarti I wouldn't actually expect that to be the case - Is this a dockerode limitation issue?

@chrmarti
Copy link
Contributor

@Chuxel docker-modem currently doesn't read from .ssh/config (apocas/docker-modem#113). The only way to authenticate is via the username in the URI and the private key in the ssh-agent from what I see.

@Chuxel
Copy link
Member

Chuxel commented Dec 16, 2019

Got it - yeah, definitely want raise visibility then. Will make that change.

@Chuxel Chuxel added upstream Issue identified as 'upstream' component related (exists outside of VS Code Remote) and removed doc labels Dec 18, 2019
@Chuxel
Copy link
Member

Chuxel commented Dec 18, 2019

Doc update will land soon - thanks for catching this. @chrmarti, I removed the doc tag and left it as upstream for tracking. Will also tweak the subject

@Chuxel Chuxel changed the title unable to connect to container with ssh Unable to connect to container with ssh unless SSH key is in a running SSH agent Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
containers Issue in vscode-remote containers upstream Issue identified as 'upstream' component related (exists outside of VS Code Remote)
Projects
None yet
Development

No branches or pull requests

3 participants