vscode: ssh failed

Type: Bug

Windows terminal can ssh,but vscode ssh failed.

VS Code version: Code 1.82.0 (8b617bd08fd9e3fc94d14adb8d358b56e3f72314, 2023-09-06T22:07:07.438Z) OS version: Windows_NT x64 10.0.22621 Modes: Connection to ‘SSH: TencentCloud’ could not be established

System Info
Item Value
CPUs 12th Gen Intel® Core™ i7-12700 (20 x 2112)
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 63.74GB (55.40GB free)
Process Argv –crash-reporter-id 3519451f-7584-4665-a098-0325dabcd4c8
Screen Reader no
VM 50%

Connection to ‘SSH: TencentCloud’ could not be established

Extensions: none
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vsdfh931cf:30280410
vshan820:30294714
vstes263cf:30335440
vscoreces:30445986
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vscccc:30803845
282f8724:30602487
89544117:30613380
showlangstatbar:30737416
0bi6i642:30831757
03d35959:30757346
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30805730
pythonnoceb:30805159
dsvsc013:30795093
dsvsc014:30804076
diffeditorv2:30821572
dsvsc015:30829745

ERROR CODE VSCODE OUTPUT: [11:36:47.132] Log Level: 2 [11:36:47.137] SSH Resolver called for “ssh-remote+7b22686f73744e616d65223a2254656e63656e74436c6f7564227d”, attempt 1 [11:36:47.138] “remote.SSH.useLocalServer”: false [11:36:47.138] “remote.SSH.useExecServer”: false [11:36:47.138] “remote.SSH.showLoginTerminal”: false [11:36:47.138] “remote.SSH.remotePlatform”: {“110”:“linux”,“112”:“linux”,“10.1.36.30”:“linux”,“114.213.162.194”:“linux”,“10.1.36.3”:“linux”,“106.12.144.10”:“linux”,“192.168.5.40”:“linux”,“TencentCloud”:“linux”,“algo003”:“linux”,“algo”:“linux”,“5.40”:“linux”,“10.1.36.45”:“linux”} [11:36:47.138] “remote.SSH.path”: undefined [11:36:47.138] “remote.SSH.configFile”: undefined [11:36:47.138] “remote.SSH.useFlock”: true [11:36:47.139] “remote.SSH.lockfilesInTmp”: false [11:36:47.139] “remote.SSH.localServerDownload”: auto [11:36:47.139] “remote.SSH.remoteServerListenOnSocket”: true [11:36:47.139] “remote.SSH.showLoginTerminal”: false [11:36:47.139] “remote.SSH.defaultExtensions”: [] [11:36:47.140] “remote.SSH.loglevel”: 2 [11:36:47.140] “remote.SSH.enableDynamicForwarding”: true [11:36:47.140] “remote.SSH.enableRemoteCommand”: true [11:36:47.140] “remote.SSH.serverPickPortsFromRange”: {} [11:36:47.140] “remote.SSH.serverInstallPath”: {} [11:36:47.142] VS Code version: 1.82.0 [11:36:47.142] Remote-SSH version: remote-ssh@0.106.3 [11:36:47.142] win32 x64 [11:36:47.142] SSH Resolver called for host: TencentCloud [11:36:47.142] Setting up SSH remote “TencentCloud” [11:36:47.144] Using commit id “8b617bd08fd9e3fc94d14adb8d358b56e3f72314” and quality “stable” for server [11:36:47.146] Install and start server if needed [11:36:47.148] Checking ssh with “E:\Application\vmware\bin\ssh.exe -V” [11:36:47.149] Got error from ssh: spawn E:\Application\vmware\bin\ssh.exe ENOENT [11:36:47.149] Checking ssh with “C:\Program Files\Common Files\Oracle\Java\javapath\ssh.exe -V” [11:36:47.150] Got error from ssh: spawn C:\Program Files\Common Files\Oracle\Java\javapath\ssh.exe ENOENT [11:36:47.150] Checking ssh with “C:\Windows\system32\ssh.exe -V” [11:36:47.151] Got error from ssh: spawn C:\Windows\system32\ssh.exe ENOENT [11:36:47.151] Checking ssh with “C:\Windows\ssh.exe -V” [11:36:47.151] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT [11:36:47.151] Checking ssh with “C:\Windows\System32\Wbem\ssh.exe -V” [11:36:47.152] Got error from ssh: spawn C:\Windows\System32\Wbem\ssh.exe ENOENT [11:36:47.152] Checking ssh with “C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V” [11:36:47.153] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT [11:36:47.153] Checking ssh with “C:\Windows\System32\OpenSSH\ssh.exe -V” [11:36:47.171] > OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3

[11:36:47.173] Running script with connection command: “C:\Windows\System32\OpenSSH\ssh.exe” -T -D 51479 “TencentCloud” bash [11:36:47.174] Terminal shell path: C:\Windows\System32\cmd.exe [11:36:48.130] > d84aea9a1478: running

]0;C:\Windows\System32\cmd.exe [11:36:48.131] Got some output, clearing connection timeout [11:36:48.148] > Acquiring lock on /home/ubuntu/.vscode-server/bin/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/vscode-remote-lock.ubuntu.8b617bd08fd9e3fc94d14adb8d358b56e3f72314 [11:36:48.154] > Found old VS Code install b380da4ef1ee00e224a15c1d4d9793e27c2b6302, attempting to clean up Deleting old install from /home/ubuntu/.vscode-server/bin/b380da4ef1ee00e224a15c1d4d9793e27c2b6302 [11:36:48.532] > Deleting old log file from /home/ubuntu/.vscode-server/.b380da4ef1ee00e224a15c1d4d9793e27c2b6302.log Installing to /home/ubuntu/.vscode-server/bin/8b617bd08fd9e3fc94d14adb8d358b56e3f72314… d84aea9a1478%%1%% Downloading with wget [11:36:52.981] > Download complete d84aea9a1478%%2%% tar --version: tar (GNU tar) 1.34 Copyright © 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.Written by John Gilmore and Jay Fenlason.

[11:36:54.174] > Checking /home/ubuntu/.vscode-server/.8b617bd08fd9e3fc94d14adb8d358b56e3f72314.log and /home/ubuntu/.vscode-server/.8b617bd08fd9e3fc94d14adb8d358b56e3f72314.pid for a running server

Running ssh connection command… /home/ubuntu/.vscode-server/bin/8b617bd08fd9e3fc94d14adb8d358b56e3f72314/bin/code-server --start-server --host=127.0.0.1 --accept-server-license-terms --enable-remote-auto-shutdown --telemetry-level all --socket-path=/run/user/1000/vscode-ssh-remote-server-sock-1694489807 &> “/home/u ubuntu/.vscode-server/.8b617bd08fd9e3fc94d14adb8d358b56e3f72314.log” < /dev/null printenv: SHELL=/bin/bash PWD=/home/ubuntu LOGNAME=ubuntu XDG_SESSION_TYPE=tty MOTD_SHOWN=pam HOME=/home/ubuntu LANG=en_US.UTF-8 VSCODE_AGENT_FOLDER=/home/ubuntu/.vscode-server SSH_CONNECTION=117.114.138.166 51480 10.0.24.8 22 XDG_SESSION_CLASS=user USER=ubuntu SHLVL=0 XDG_SESSION_ID=30493 XDG_RUNTIME_DIR=/run/user/1000 SSH_CLIENT=117.114.138.166 51480 22 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games s:/usr/local/games:/snap/bin DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus OLDPWD=/home/ubuntu/.vscode-server/bin/8b617bd08fd9e3fc94d14adb8d358b56e3f72 2314 _=/usr/bin/printenv [11:36:54.197] > rm: cannot remove ‘/home/ubuntu/.vscode-server/.8b617bd08fd9e3fc94d14adb8d358b56 6e3f72314.token’: No such file or directory Spawned remote server: 1693273 Waiting for server log… [11:36:54.215] > [11:36:54.231] > Waiting for server log… [11:36:54.247] > [11:36:54.272] >
*

d84aea9a1478: start SSH_AUTH_SOCK==== DISPLAY==== webUiAccessToken==== listeningOn==/run/user/1000/vscode-ssh-remote-server-sock-1694489807== osReleaseId==ubuntu== arch==x86_64== vscodeArch==x64== bitness==64== tmpDir==/run/user/1000== platform==linux== unpackResult==success== [11:36:54.280] > didLocalDownload==0== downloadTime==4453== installTime==1182== extInstallTime==== serverStartTime==77== connectionToken==11aa11a1-aa11-1a11-11a1-11111a1a1a11== d84aea9a1478: end [11:36:54.281] Received install output: SSH_AUTH_SOCK==== DISPLAY==== webUiAccessToken==== listeningOn==/run/user/1000/vscode-ssh-remote-server-sock-1694489807== osReleaseId==ubuntu== arch==x86_64== vscodeArch==x64== bitness==64== tmpDir==/run/user/1000== platform==linux== unpackResult==success== didLocalDownload==0== downloadTime==4453== installTime==1182== extInstallTime==== serverStartTime==77== connectionToken==11aa11a1-aa11-1a11-11a1-11111a1a1a11==

[11:36:54.282] Failed to parse remote port from server output [11:36:54.284] Resolver error: Error: at g.Create (c:\Users\Zhonghui Wu.vscode\extensions\ms-vscode-remote.remote-ssh-0.106.3\out\extension.js:2:637876) at t.handleInstallOutput (c:\Users\Zhonghui Wu.vscode\extensions\ms-vscode-remote.remote-ssh-0.106.3\out\extension.js:2:635279) at t.tryInstall (c:\Users\Zhonghui Wu.vscode\extensions\ms-vscode-remote.remote-ssh-0.106.3\out\extension.js:2:756875) at async c:\Users\Zhonghui Wu.vscode\extensions\ms-vscode-remote.remote-ssh-0.106.3\out\extension.js:2:717467 at async t.withShowDetailsEvent (c:\Users\Zhonghui Wu.vscode\extensions\ms-vscode-remote.remote-ssh-0.106.3\out\extension.js:2:720720) at async C (c:\Users\Zhonghui Wu.vscode\extensions\ms-vscode-remote.remote-ssh-0.106.3\out\extension.js:2:714381) at async t.resolve (c:\Users\Zhonghui Wu.vscode\extensions\ms-vscode-remote.remote-ssh-0.106.3\out\extension.js:2:718116) at async c:\Users\Zhonghui Wu.vscode\extensions\ms-vscode-remote.remote-ssh-0.106.3\out\extension.js:2:901786 [11:36:54.287] ------

[11:36:54.478] >

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Reactions: 2
  • Comments: 15 (1 by maintainers)

Most upvoted comments

You can click the down signal next to the Uninstall button, then you’ll see an Install another version option. I reply through email with a pic attached, but it seems the attachment was left behind…

VS Code 1.82.0 When reinstalled Remote SSH from v0.107 to v0.105.0 didn’t changed error.

I tried disabling the parameter ‘exec server’ from extension settings - it helped to connect.

**>于2023年9月12日 周二13:01写道:

Okay, it has been solved. Indeed, version 0.105 can successfully connect to the server. Thank you very much for your help!

Next to the uninstall button, you have a dropdown, clicking on that will give you the option “Install Another Version…”. Choose the version you would like to use and reload the window.