microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.68k stars 296 forks source link

Remote SSH Connection Issue with VS Code Using WSL on Windows #10430

Open jack-krolik opened 3 weeks ago

jack-krolik commented 3 weeks ago

Type: Bug

I am experiencing issues connecting to a remote server (spirit.cin.ucsf.edu) via SSH in VS Code on Windows, using WSL as my primary environment. I am able to connect to the server without any problems through the WSL terminal directly, but when I attempt the connection through VS Code's Remote SSH extension, it fails with the following error: The terminal process "C:\Windows\System32\cmd.exe /c (type "C:\Users\bellj\AppData\Local\Temp\vscode-linux-multi-line-command-spirit.cin.ucsf.edu-850316979.sh" | "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 61353 -F "/home/jackkrolik/.ssh/config" "spirit.cin.ucsf.edu" sh) & exit /b 0" terminated with exit code: 1.

Additionally, I receive extensive logs, including multiple errors about SSH binaries and configuration paths. Here is a portion of the log with key details: [13:49:31.154] "remote.SSH.path": C:\Windows\System32\wsl.exe -e /home/jackkrolik/bin/ssh-wrapper.sh [13:49:31.165] Setting up SSH remote "spirit.cin.ucsf.edu" [13:49:32.329] Checking ssh with "C:\Windows\System32\wsl.exe -e /home/jackkrolik/bin/ssh-wrapper.sh -V" [13:49:32.331] Got error from ssh: spawn C:\Windows\System32\wsl.exe -e /home/jackkrolik/bin/ssh-wrapper.sh ENOENT [13:49:32.332] The specified path C:\Windows\System32\wsl.exe -e /home/jackkrolik/bin/ssh-wrapper.sh is not a valid SSH binary

Environment:

VS Code Version: 1.95.0 Remote-SSH Extension Version: 0.115.0 Operating System: Windows with WSL (Windows Subsystem for Linux) WSL Distro: Ubuntu (using WSL as the terminal in VS Code) Steps Taken:

Verified that SSH works directly in WSL. Configured the SSH settings in VS Code's settings.json. Attempted using both "remote.SSH.path": "wsl" and "remote.SSH.path": "C:\Windows\System32\OpenSSH\ssh.exe". Ensured correct permissions for id_ed25519 and config files in .ssh directory. Expected Outcome: To establish a stable SSH connection to the remote server (spirit.cin.ucsf.edu) within VS Code using WSL, as I can do directly through the WSL terminal.

Extension version: 0.115.0 VS Code version: Code 1.95.0 (912bb683695358a54ae0c670461738984cbb5b95, 2024-10-28T20:16:24.561Z) OS version: Windows_NT x64 10.0.22631 Modes: Remote OS version: Linux x64 5.15.153.1-microsoft-standard-WSL2

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 5 3600 6-Core Processor (12 x 3593)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off| |Load (avg)|undefined| |Memory (System)|15.93GB (2.80GB free)| |Process Argv|--crash-reporter-id be09369b-40d0-4434-b759-69e9c762ea89| |Screen Reader|no| |VM|29%| |Item|Value| |---|---| |Remote|WSL: Ubuntu| |OS|Linux x64 5.15.153.1-microsoft-standard-WSL2| |CPUs|AMD Ryzen 5 3600 6-Core Processor (12 x 0)| |Memory (System)|7.72GB (6.12GB free)| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 pythonnoceb:30805159 asynctok:30898717 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 f3je6385:31013174 dvdeprecation:31068756 dwnewjupyter:31046869 2f103344:31071589 impr_priority:31102340 nativerepl1:31139838 refactort:31108082 pythonrstrctxt:31112756 wkspc-onlycs-t:31132770 wkspc-ranged-t:31151552 cf971741:31144450 iacca1:31171482 notype1:31157159 5fd0e150:31155592 dwcopilot:31170013 ```
norahvii commented 3 weeks ago

This is a problem with v0.88.5 and it affects your connection with Windows and WSL. To quickly resolve I recommend rolling back your version to 88.3.

When you try to connect, an error message says:

jack-krolik commented 3 weeks ago

Thanks for the information! However, do you mean v1.88.3? I don't see a version v1.88.3, Also Remote - SSH Extension requires: ^1.93.0.

This is a problem with v0.88.5 and it affects your connection with Windows and WSL. To quickly resolve I recommend rolling back your version to 88.3.

When you try to connect, an error message says:

  • command remote-wsl.connectInNewWindow not found.
  • File system provider for vscode-remote://wsl%... is not available.
  • command remote-wsl.connect not found.
norahvii commented 3 weeks ago

@jack-krolik I mean v0.88.3 of the WSL extension for VS Code.

jack-krolik commented 2 weeks ago

@jack-krolik I mean v0.88.3 of the WSL extension for VS Code.

But it also happens if I try to connect while I'm just on regular VS Code. I also tried downgrading the extension but it still happens

jack-krolik commented 2 weeks ago

@roblourens Are you able to assist at all?

QuentinScDS commented 1 day ago

Same :/

jack-krolik commented 22 hours ago

Same :/

You’re having the same issue? Are you also using VS Code WSL? @QuentinScDS

QuentinScDS commented 22 hours ago

Sorry, it works after rollback

Same :/

You’re having the same issue? Are you also using VS Code WSL? @QuentinScDS

jack-krolik commented 21 hours ago

Sorry, it works after rollback

Same :/

You’re having the same issue? Are you also using VS Code WSL? @QuentinScDS

Can you elaborate? What’s your setup? How’d you get it to work? @QuentinScDS