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

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

Closed
jack-krolik opened this issue Nov 22, 2024 · 4 comments
Closed

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

jack-krolik opened this issue Nov 22, 2024 · 4 comments
Assignees
Labels
info-needed Issue requires more information from poster remote Remote system operations issues

Comments

@jack-krolik
Copy link

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 (912bb68, 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

@ntrogh ntrogh transferred this issue from microsoft/vscode-docs Nov 24, 2024
Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.95.3. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@jack-krolik
Copy link
Author

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.95.3. Please try upgrading to the latest version and checking whether this issue remains.

This has been going on long before I upgraded to the newest version. This is not the issue

@vs-code-engineering vs-code-engineering bot added the stale Issues that have not been triaged in an appropriate amount of time label Dec 2, 2024
@bpasero bpasero removed their assignment Dec 2, 2024
@rzhao271 rzhao271 assigned joshspicer and unassigned bhavyaus Dec 16, 2024
@rzhao271 rzhao271 removed the stale Issues that have not been triaged in an appropriate amount of time label Dec 16, 2024
@rzhao271 rzhao271 added bug Issue identified by VS Code Team member as probable bug remote Remote system operations issues labels Dec 17, 2024
@joshspicer
Copy link
Member

as I can do directly through the WSL terminal.

From the log snippet you've provided, it looks like the Remote - SSH extension is not using WSL? I see Windows paths.

"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"

That seems suspicious. I see you've been playing around with various settings. Could you include your entire log so we can see more about your environment? You might also want to take a look at some discussion in this issue, I think it will help: microsoft/vscode-remote-release#937

@joshspicer joshspicer added info-needed Issue requires more information from poster and removed bug Issue identified by VS Code Team member as probable bug labels Dec 19, 2024
Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vs-code-engineering vs-code-engineering bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 27, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Feb 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster remote Remote system operations issues
Projects
None yet
Development

No branches or pull requests

5 participants