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 start Devcontainers over SSH after Windows Udpate to version 22H2 #7355

Closed
crauterb opened this issue Oct 13, 2022 · 14 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release containers Issue in vscode-remote containers verified Verification succeeded
Milestone

Comments

@crauterb
Copy link

crauterb commented Oct 13, 2022

  • VSCode Version: 1.72.1
  • Local OS Version: Windows 11, version 22H2
  • Remote OS Version: SUSE Linux Enterprise Server 15 SP3
  • Remote Extension/Connection Type: Container over SSH
  • Logs: (with redacted hostname)
[89590 ms] Dev Containers 0.259.0 in VS Code 1.72.1 (129500ee4c8ab7263461ffe327268ba56b9f210d).
[89590 ms] Start: Run: ssh HOSTNAME /bin/sh
[89603 ms] Start: Run in host: id -un

Steps to Reproduce:

  1. I open the remote folder via the SSH-Extension in VSCode, which works fine
  2. I have an existing .devcontainer spefication
  3. If I try to "Reopen in Container", the log above is shown and the process hangs.

Does this issue occur when you try this locally?: No

Just as a side note: I did my Windows update to version 22H2 this morning, everything else worked fine until then...

EDIT: I am able to reproduce this problem on another server in my home which is running a Ubuntu 20.04.4 LTS

@github-actions github-actions bot added the ssh Issue in vscode-remote SSH label Oct 13, 2022
@eleanorjboyd
Copy link
Member

Hello! Could you please provide the entire remote-ssh logs? The whole logs include some additional information that is helpful to the debugging process. Feel free to remove any confidential information as you see fit but the logs are most helpful when they are verbose so include as much as possible. Thanks!

@eleanorjboyd eleanorjboyd self-assigned this Oct 13, 2022
@eleanorjboyd eleanorjboyd added the info-needed Issue requires more information from poster label Oct 13, 2022
@crauterb
Copy link
Author

Alright, so I am guessing you are refering to the output from the remote-ssh as shown in VS-Code itself.
This is what the extension prints: remote-ssh-output.log

I have redacted some paths & user information.
Quick note: The log speaks of multiple hosts: "remote.SSH.remotePlatform": {"LOCAL-MACHINE01":"linux","LOCAL-MACHINE02":"linux","REMOTE-HOST01":"linux","REMOTE-HOST02":"linux"}
I am able to reproduce the behaviour on all of them.

If helpful, these are the exhost.log and remoteagent.log from the .vscode-server/data/logs/ from the remote machine:
exthost.log
remoteagent.log

@HaozheQi
Copy link

Hi @crauterb , thank you for your note to make me realize that updating the windows is the key reason. I experienced exactly the same problem when I try to attach a running container to VScode in the remote ssh window. It hangs at Start: Run in host: id -un.
Do you have any idea about how to solve this problem? @chrmarti , @eleanorjboyd Thank you very much in advance!

image

@HyoungsungKim
Copy link

Having the same issue after the windows update.

I am using Windows and Manjaro Linux.

There is no problem when I attach a running container to VSCode in Linux.

However, when I try to attach a container running in Linux after connecting to Linux via ssh from my local PC (Windows), "Attach Shell" works, but "Attach Visual Studio Code" does not work.

@aklashto
Copy link

Experiencing the same issue.

Extension version: 0.21.0
VS Code version: Code - Insiders 1.73.0-insider (9d3fbb3d9a50055be0a8c6d721625d02c9de492d, 2022-10-19T09:43:23.052Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: Yes
Remote OS version: Linux x64 5.15.0-50-generic

System Info
Item Value
CPUs AMD Ryzen 5 3600 6-Core Processor (12 x 3600)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 15.95GB (7.61GB free)
Process Argv --crash-reporter-id 5594ff9b-61ab-4288-866e-c8e9486a9d12
Screen Reader no
VM 0%
Item Value
Remote SSH: janus
OS Linux x64 5.15.0-50-generic
CPUs 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (8 x 2800)
Memory (System) 15.35GB (11.49GB free)
VM 0%
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30422396
pythontb:30258533
vsc_aa:30263845
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805cf:30301675
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30404738
cppdebug:30492333
vsclangdf:30492506
c4g48928:30535728
dsvsc012cf:30540253
pylantcb52:30590116
pyind367cf:30587848
vscccc:30564267
pyindex848cf:30577859
nodejswelcome1:30587009

@crauterb
Copy link
Author

Recent windows updates still have not fixed this issue for me.

Is there any more information that you need to tackle this :-)

@crauterb
Copy link
Author

Adding the SSH-Key to my ssh-agent using ssh-add did solve the issue for me for the moment.

However, on my Windows 10 machine, it still works without adding the key and therefore using the password-prompt.
I would like to solve this without adding the ssh-key due to security guidelines.

Is it possible that something is broken in Windows 11 using the password prompt from the ssh-agent?
I am happy to help & investigate if you give me some ideas where to look :-)

@chrmarti
Copy link
Contributor

The logic for when to use the command set in SSH_ASKPASS seems to have changed in ssh. Setting SSH_ASKPASS_REQUIRE=force makes it work again. I will add that in the extension, if you get a chance to run VS Code with that environment variable set, please let me know if it works.

@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers and removed ssh Issue in vscode-remote SSH info-needed Issue requires more information from poster labels Oct 28, 2022
@chrmarti chrmarti added this to the November 2022 milestone Oct 28, 2022
@chrmarti
Copy link
Contributor

Might have changed with PowerShell/openssh-portable@aaa8b60 which is tagged as v8.6.0.0 dated May 27, 2021. /fyi @eleanorjboyd @roblourens (although Remote-SSH does not seem to use SSH_ASKPASS for Windows)

@eleanorjboyd
Copy link
Member

Hi! We are currently tracking a problem that was discovered and caused by a windows regression. I am not totally sure but could it be related to this? #7272

@lodif
Copy link

lodif commented Oct 29, 2022

The logic for when to use the command set in SSH_ASKPASS seems to have changed in ssh. Setting SSH_ASKPASS_REQUIRE=force makes it work again. I will add that in the extension, if you get a chance to run VS Code with that environment variable set, please let me know if it works.

I have the same problem and I tested your solution by doing the following:

  1. open CMD on Windows
  2. set SSH_ASKPASS_REQUIRE=force to set the env variable needed
  3. code to open VSCode
  4. connect to the SSH machine by clicking "Open on SSH Host in Current Window"
  5. reopen the devcontainer

In this way everything is working and it's asking the password again.
Thanks!

@chrmarti chrmarti added the candidate Issue identified as probable candidate for fixing in the next release label Oct 31, 2022
@chrmarti chrmarti modified the milestones: November 2022, October 2022 Oct 31, 2022
@chrmarti
Copy link
Contributor

Thanks @lodif for confirming this works!

@eleanorjboyd #7272 seems to be a different issue. I couldn't reproduce the problem tracked here with Remote-SSH although you also seem to use SSH_ASKPASS for Windows when adding "remote.SSH.useLocalServer": true to the user settings.

@chrmarti
Copy link
Contributor

Fixed in Dev Containers 0.262.1-pre-release. Could someone seeing this confirm it is indeed fixed in this version? Thanks.

@lodif
Copy link

lodif commented Nov 1, 2022

Fixed in Dev Containers 0.262.1-pre-release. Could someone seeing this confirm it is indeed fixed in this version? Thanks.

I tried it out and now it's working. Thanks @chrmarti!

@rebornix rebornix added the verified Verification succeeded label Nov 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release containers Issue in vscode-remote containers verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

8 participants