microsoft / microsoft/vscode-remote-release

Failed to set up socket for dynamic port forward to remote

Open
#11,113 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ssh
Dominant language
Dockerfile
Stars
4.2k
Forks
469
Avg merge
1d 1h
Merged PRs (30d)
1

Description

Is there an existing issue for this bug?
  • I have searched the existing open issues and found none that apply.
  • If I find any issue of interest that is related or closed, I will included a link to it in this issue.
Required Troubleshooting Steps
  • I have read and performed the troubleshooting steps
  • I have tried both values of the remote.SSH.useLocalServer setting
  • My issue was not covered in the Tips and Tricks linked from the Troubleshooting Wiki.
  • I will include a complete copy of my Remote - SSH logs by running Remote-SSH: Show Log in the command palette or from View > Output in the menu bar
[Optional] Diagnose with Copilot

I asked @remote-ssh but it did not help

In step 2 of the troubleshooting wiki, what was the result of running the generated SSH command verbatim outside of VS Code?

I did not try step 2 of the troubleshooting steps

Remote-SSH Log
Remote-SSH Log

[16:17:08.745] Log Level: 2
[16:17:08.749] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a22387841383030227d", attempt 1
[16:17:08.753] remote.SSH.useLocalServer = false
[16:17:08.754] remote.SSH.useExecServer = true
[16:17:08.754] remote.SSH.bindHost = {}
[16:17:08.754] remote.SSH.showLoginTerminal = false
[16:17:08.754] remote.SSH.remotePlatform = {"123":"linux","10.251.171.6":"linux","4x4090":"linux","8xA6000":"linux","8xA800":"linux","Group":"linux","hk":"linux","HK-3090":"linux","myserver":"linux","remote":"linux","schoolHPC":"linux","SchoolHPC":"linux","zhuotaotian":"linux","zhuotaotian_39_dataset":"linux"}
[16:17:08.754] remote.SSH.path = 
[16:17:08.754] remote.SSH.configFile = D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config
[16:17:08.755] remote.SSH.useFlock = true
[16:17:08.755] remote.SSH.lockfilesInTmp = false
[16:17:08.756] remote.SSH.localServerDownload = auto
[16:17:08.756] remote.SSH.remoteServerListenOnSocket = false
[16:17:08.756] remote.SSH.defaultExtensions = []
[16:17:08.756] remote.SSH.defaultExtensionsIfInstalledLocally = []
[16:17:08.756] remote.SSH.loglevel = 2
[16:17:08.756] remote.SSH.enableDynamicForwarding = false
[16:17:08.756] remote.SSH.enableRemoteCommand = false
[16:17:08.757] remote.SSH.serverPickPortsFromRange = {}
[16:17:08.757] remote.SSH.serverInstallPath = {"8xA6000":"/data3/zhuotaotian/psp","8xA800":"/data3/zhuotaotian/psp"}
[16:17:08.757] remote.SSH.permitPtyAllocation = false
[16:17:08.757] remote.SSH.preferredLocalPortRange = undefined
[16:17:08.757] remote.SSH.useCurlAndWgetConfigurationFiles = false
[16:17:08.757] remote.SSH.experimental.chat = true
[16:17:08.757] remote.SSH.experimental.enhancedSessionLogs = true
[16:17:08.757] remote.SSH.httpProxy = {"*":""}
[16:17:08.758] remote.SSH.httpsProxy = {"*":""}
[16:17:08.761] VS Code version: 1.102.2
[16:17:08.761] Remote-SSH version: remote-ssh@0.121.2025071515
[16:17:08.762] win32 x64
[16:17:08.768] SSH Resolver called for host: 8xA800
[16:17:08.768] Setting up SSH remote "8xA800"
[16:17:08.772] Using commit id "c306e94f98122556ca081f527b466015e1bc37b0" and quality "stable" for server
[16:17:08.772] Extensions to install: 
[16:17:08.779] Install and start server if needed
[16:17:08.781] Checking ssh with "C:\Python313\Scripts\ssh.exe -V"
[16:17:08.783] Got error from ssh: spawn C:\Python313\Scripts\ssh.exe ENOENT
[16:17:08.783] Checking ssh with "C:\Python313\ssh.exe -V"
[16:17:08.784] Got error from ssh: spawn C:\Python313\ssh.exe ENOENT
[16:17:08.784] Checking ssh with "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9\bin\ssh.exe -V"
[16:17:08.785] Got error from ssh: spawn C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9\bin\ssh.exe ENOENT
[16:17:08.785] Checking ssh with "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9\libnvvp\ssh.exe -V"
[16:17:08.786] Got error from ssh: spawn C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9\libnvvp\ssh.exe ENOENT
[16:17:08.786] Checking ssh with "C:\Program Files\Common Files\Oracle\Java\javapath\ssh.exe -V"
[16:17:08.787] Got error from ssh: spawn C:\Program Files\Common Files\Oracle\Java\javapath\ssh.exe ENOENT
[16:17:08.787] Checking ssh with "C:\WINDOWS\system32\ssh.exe -V"
[16:17:08.788] Got error from ssh: spawn C:\WINDOWS\system32\ssh.exe ENOENT
[16:17:08.788] Checking ssh with "C:\WINDOWS\ssh.exe -V"
[16:17:08.788] Got error from ssh: spawn C:\WINDOWS\ssh.exe ENOENT
[16:17:08.789] Checking ssh with "C:\WINDOWS\System32\Wbem\ssh.exe -V"
[16:17:08.789] Got error from ssh: spawn C:\WINDOWS\System32\Wbem\ssh.exe ENOENT
[16:17:08.789] Checking ssh with "C:\WINDOWS\System32\WindowsPowerShell\v1.0\ssh.exe -V"
[16:17:08.790] Got error from ssh: spawn C:\WINDOWS\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT
[16:17:08.790] Checking ssh with "C:\WINDOWS\System32\OpenSSH\ssh.exe -V"
[16:17:08.826] > OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2

[16:17:08.832] Using SSH config file "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config"
[16:17:08.832] Running script with connection command: "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -o ClearAllForwardings=true -F "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config" "8xA800" sh
[16:17:08.834] Generated SSH command: 'type "C:\Users\psp_dada\AppData\Local\Temp\vscode-linux-multi-line-command-8x-800-630643630.sh" | "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -o ClearAllForwardings=true -F "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config" "8xA800" sh'
[16:17:08.834] Using connect timeout of 17 seconds
[16:17:08.835] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[16:17:09.055] > 
[16:17:09.055] Got some output, clearing connection timeout
[16:17:09.358] > 0db3c6f71c18: running
> Script executing under PID: 463148
[16:17:09.370] > Found existing installation at /data3/zhuotaotian/psp/.vscode-server...
> Starting VS Code CLI...
> Removing old logfile at /data3/zhuotaotian/psp/.vscode-server/.cli.c306e94f98122556ca081f527b466015e1bc37b0.log
> Spawned remote CLI: 463166
> Waiting for server log...
[16:17:09.404] > 0db3c6f71c18: start
> listeningOn==127.0.0.1:35515==
> osReleaseId==ubuntu==
> arch==x86_64==
[16:17:09.419] > vscodeArch==x64==
> bitness==64==
> tmpDir==/run/user/1009==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==40==
> execServerToken==a111aa1a-1aaa-11aa-aa1a-a11a11a111a1==
> platformDownloadPath==cli-alpine-x64==
> DISPLAY====
> 0db3c6f71c18: end
[16:17:09.419] Received install output: 
listeningOn==127.0.0.1:35515==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1009==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==40==
execServerToken==a111aa1a-1aaa-11aa-aa1a-a11a11a111a1==
platformDownloadPath==cli-alpine-x64==
DISPLAY====

[16:17:09.420] Remote server is listening on port 35515
[16:17:09.420] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":35515},"osReleaseId":"ubuntu","arch":"x86_64","display":"","tmpDir":"/run/user/1009","platform":"linux","execServerToken":"a111aa1a-1aaa-11aa-aa1a-a11a11a111a1"},"serverStartTime":40,"installUnpackCode":""}
[16:17:09.426] Using SSH config file "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config"
[16:17:09.427] Running script with connection command: "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -L 127.0.0.1:55906:127.0.0.1:35515 -F "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config" "8xA800" sh
[16:17:09.428] Spawning tunnel with: type "C:\Users\psp_dada\AppData\Local\Temp\vscode-linux-multi-line-command-8x-800-178259139.sh" | "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -L 127.0.0.1:55906:127.0.0.1:35515 -F "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config" "8xA800" sh
[16:17:09.428] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[16:17:09.636] > 
[16:17:09.933] > Connected to SSH Host - Please do not close this terminal
[16:17:09.933] Spawned SSH tunnel between local port 55906 and remote target port 35515
[16:17:09.933] Waiting for ssh tunnel to be ready
[16:17:10.249] Tunneled port 35515 to local port 55906
[16:17:10.250] Resolved "ssh-remote+7b22686f73744e616d65223a22387841383030227d" to "port 55906"
[16:17:10.255] Initizing new exec server for ssh-remote+7b22686f73744e616d65223a22387841383030227d
[16:17:10.255] Resolving exec server at port 55906
[16:17:10.561] Exec server for ssh-remote+7b22686f73744e616d65223a22387841383030227d failed: Error: connect ETIMEDOUT 127.0.0.1:55906
[16:17:10.561] Resolver error: Error: connect ETIMEDOUT 127.0.0.1:55906
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1636:16)
[16:17:10.564] ------




[16:17:10.564] No hints found in the recent session.
[16:17:10.898] Opening exec server for ssh-remote+7b22686f73744e616d65223a22387841383030227d
[16:17:11.030] Opening exec server for ssh-remote+7b22686f73744e616d65223a22387841383030227d
[16:17:11.040] Initizing new exec server for ssh-remote+7b22686f73744e616d65223a22387841383030227d
[16:17:11.041] Using commit id "c306e94f98122556ca081f527b466015e1bc37b0" and quality "stable" for server
[16:17:11.041] Extensions to install: 
[16:17:11.045] Install and start server if needed
[16:17:11.049] Using SSH config file "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config"
[16:17:11.049] Running script with connection command: "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -o ClearAllForwardings=true -F "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config" "8xA800" sh
[16:17:11.050] Generated SSH command: 'type "C:\Users\psp_dada\AppData\Local\Temp\vscode-linux-multi-line-command-8x-800-425417163.sh" | "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -o ClearAllForwardings=true -F "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config" "8xA800" sh'
[16:17:11.051] Using connect timeout of 17 seconds
[16:17:11.051] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[16:17:11.322] > 
[16:17:11.322] Got some output, clearing connection timeout
[16:17:11.577] > dc0d850f2a4f: running
> Script executing under PID: 463398
[16:17:11.592] > Found existing installation at /data3/zhuotaotian/psp/.vscode-server...
> Starting VS Code CLI...
> Removing old logfile at /data3/zhuotaotian/psp/.vscode-server/.cli.c306e94f98122556ca081f527b466015e1bc37b0.log
> Spawned remote CLI: 463417
> Waiting for server log...
[16:17:11.621] > dc0d850f2a4f: start
[16:17:11.638] > listeningOn==127.0.0.1:40839==
> osReleaseId==ubuntu==
> arch==x86_64==
> vscodeArch==x64==
> bitness==64==
> tmpDir==/run/user/1009==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==40==
> execServerToken==a1a1a111-aaaa-1111-111a-11aa1a1111a1==
> platformDownloadPath==cli-alpine-x64==
> DISPLAY====
> dc0d850f2a4f: end
[16:17:11.639] Received install output: 
listeningOn==127.0.0.1:40839==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1009==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==40==
execServerToken==a1a1a111-aaaa-1111-111a-11aa1a1111a1==
platformDownloadPath==cli-alpine-x64==
DISPLAY====

[16:17:11.639] Remote server is listening on port 40839
[16:17:11.639] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":40839},"osReleaseId":"ubuntu","arch":"x86_64","display":"","tmpDir":"/run/user/1009","platform":"linux","execServerToken":"a1a1a111-aaaa-1111-111a-11aa1a1111a1"},"serverStartTime":40,"installUnpackCode":""}
[16:17:11.642] Using SSH config file "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config"
[16:17:11.642] Running script with connection command: "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -L 127.0.0.1:55930:127.0.0.1:40839 -F "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config" "8xA800" sh
[16:17:11.644] Spawning tunnel with: type "C:\Users\psp_dada\AppData\Local\Temp\vscode-linux-multi-line-command-8x-800-353215432.sh" | "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -L 127.0.0.1:55930:127.0.0.1:40839 -F "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config" "8xA800" sh
[16:17:11.645] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[16:17:11.840] > 
[16:17:12.123] > Connected to SSH Host - Please do not close this terminal
[16:17:12.123] Spawned SSH tunnel between local port 55930 and remote target port 40839
[16:17:12.123] Waiting for ssh tunnel to be ready
[16:17:12.433] Tunneled port 40839 to local port 55930
[16:17:12.433] Resolved "ssh-remote+7b22686f73744e616d65223a22387841383030227d" to "port 55930"
[16:17:12.433] Resolving exec server at port 55930
[16:17:12.743] Exec server for ssh-remote+7b22686f73744e616d65223a22387841383030227d failed: Error: connect ETIMEDOUT 127.0.0.1:55930
[16:17:12.743] Existing exec server for ssh-remote+7b22686f73744e616d65223a22387841383030227d errored (Error: connect ETIMEDOUT 127.0.0.1:55930)
[16:17:12.743] Initizing new exec server for ssh-remote+7b22686f73744e616d65223a22387841383030227d
[16:17:12.744] Error opening exec server for ssh-remote+7b22686f73744e616d65223a22387841383030227d: Error: connect ETIMEDOUT 127.0.0.1:55930
[16:17:12.745] No hints found in the recent session.
[16:17:12.745] Using commit id "c306e94f98122556ca081f527b466015e1bc37b0" and quality "stable" for server
[16:17:12.745] Extensions to install: 
[16:17:12.748] Install and start server if needed
[16:17:12.751] Using SSH config file "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config"
[16:17:12.752] Running script with connection command: "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -o ClearAllForwardings=true -F "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config" "8xA800" sh
[16:17:12.753] Generated SSH command: 'type "C:\Users\psp_dada\AppData\Local\Temp\vscode-linux-multi-line-command-8x-800-309670025.sh" | "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -o ClearAllForwardings=true -F "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config" "8xA800" sh'
[16:17:12.754] Using connect timeout of 17 seconds
[16:17:12.754] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[16:17:12.958] > 
[16:17:12.959] Got some output, clearing connection timeout
[16:17:13.275] > 9f378365a574: running
> Script executing under PID: 463653
[16:17:13.304] > Found existing installation at /data3/zhuotaotian/psp/.vscode-server...
> Starting VS Code CLI...
> Removing old logfile at /data3/zhuotaotian/psp/.vscode-server/.cli.c306e94f98122556ca081f527b466015e1bc37b0.log
> Spawned remote CLI: 463671
> Waiting for server log...
[16:17:13.330] > 9f378365a574: start
> listeningOn==127.0.0.1:34937==
> osReleaseId==ubuntu==
> arch==x86_64==
> vscodeArch==x64==
> bitness==64==
> tmpDir==/run/user/1009==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==40==
> execServerToken==a1aaa111-111a-1111-1a11-1a1aaaa1111a==
> platformDownloadPath==cli-alpine-x64==
> DISPLAY====
> 9f378365a574: end
[16:17:13.330] Received install output: 
listeningOn==127.0.0.1:34937==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1009==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==40==
execServerToken==a1aaa111-111a-1111-1a11-1a1aaaa1111a==
platformDownloadPath==cli-alpine-x64==
DISPLAY====

[16:17:13.330] Remote server is listening on port 34937
[16:17:13.330] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":34937},"osReleaseId":"ubuntu","arch":"x86_64","display":"","tmpDir":"/run/user/1009","platform":"linux","execServerToken":"a1aaa111-111a-1111-1a11-1a1aaaa1111a"},"serverStartTime":40,"installUnpackCode":""}
[16:17:13.333] Using SSH config file "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config"
[16:17:13.333] Running script with connection command: "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -L 127.0.0.1:55941:127.0.0.1:34937 -F "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config" "8xA800" sh
[16:17:13.334] Spawning tunnel with: type "C:\Users\psp_dada\AppData\Local\Temp\vscode-linux-multi-line-command-8x-800-270544920.sh" | "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -L 127.0.0.1:55941:127.0.0.1:34937 -F "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config" "8xA800" sh
[16:17:13.334] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[16:17:13.546] > 
[16:17:13.834] > Connected to SSH Host - Please do not close this terminal
[16:17:13.834] Spawned SSH tunnel between local port 55941 and remote target port 34937
[16:17:13.834] Waiting for ssh tunnel to be ready
[16:17:14.148] Tunneled port 34937 to local port 55941
[16:17:14.148] Resolved "ssh-remote+7b22686f73744e616d65223a22387841383030227d" to "port 55941"
[16:17:14.148] Resolving exec server at port 55941
[16:17:14.459] Exec server for ssh-remote+7b22686f73744e616d65223a22387841383030227d failed: Error: connect ETIMEDOUT 127.0.0.1:55941
[16:17:14.460] Error opening exec server for ssh-remote+7b22686f73744e616d65223a22387841383030227d: Error: connect ETIMEDOUT 127.0.0.1:55941
[16:17:14.460] No hints found in the recent session.


Expected Behavior

I can use SSH 8xA800 to connect to the server directly. I am able to establish a connection using VSCode, and have successfully connected to the remote host and set up an SSH tunnel. However, it seems to be stuck at the "Opening Remote" stage.

Actual Behavior

If I set remote.SSH.enableDynamicForwarding= True, it behaves the same:

Remote-SSH Log

[16:22:38.581] Log Level: 2
[16:22:38.585] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a22387841383030227d", attempt 1
[16:22:38.589] remote.SSH.useLocalServer = false
[16:22:38.590] remote.SSH.useExecServer = true
[16:22:38.592] remote.SSH.bindHost = {}
[16:22:38.592] remote.SSH.showLoginTerminal = false
[16:22:38.593] remote.SSH.remotePlatform = {"123":"linux","10.251.171.6":"linux","4x4090":"linux","8xA6000":"linux","8xA800":"linux","Group":"linux","hk":"linux","HK-3090":"linux","myserver":"linux","remote":"linux","schoolHPC":"linux","SchoolHPC":"linux","zhuotaotian":"linux","zhuotaotian_39_dataset":"linux"}
[16:22:38.593] remote.SSH.path = 
[16:22:38.593] remote.SSH.configFile = D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config
[16:22:38.593] remote.SSH.useFlock = true
[16:22:38.593] remote.SSH.lockfilesInTmp = false
[16:22:38.593] remote.SSH.localServerDownload = auto
[16:22:38.594] remote.SSH.remoteServerListenOnSocket = false
[16:22:38.594] remote.SSH.defaultExtensions = []
[16:22:38.594] remote.SSH.defaultExtensionsIfInstalledLocally = []
[16:22:38.594] remote.SSH.loglevel = 2
[16:22:38.594] remote.SSH.enableDynamicForwarding = true
[16:22:38.594] remote.SSH.enableRemoteCommand = false
[16:22:38.594] remote.SSH.serverPickPortsFromRange = {}
[16:22:38.594] remote.SSH.serverInstallPath = {"8xA6000":"/data3/zhuotaotian/psp","8xA800":"/data3/zhuotaotian/psp"}
[16:22:38.595] remote.SSH.permitPtyAllocation = false
[16:22:38.595] remote.SSH.preferredLocalPortRange = undefined
[16:22:38.595] remote.SSH.useCurlAndWgetConfigurationFiles = false
[16:22:38.595] remote.SSH.experimental.chat = true
[16:22:38.595] remote.SSH.experimental.enhancedSessionLogs = true
[16:22:38.595] remote.SSH.httpProxy = {"*":""}
[16:22:38.595] remote.SSH.httpsProxy = {"*":""}
[16:22:38.597] VS Code version: 1.102.2
[16:22:38.597] Remote-SSH version: remote-ssh@0.121.2025071515
[16:22:38.597] win32 x64
[16:22:38.602] SSH Resolver called for host: 8xA800
[16:22:38.602] Setting up SSH remote "8xA800"
[16:22:38.611] Using commit id "c306e94f98122556ca081f527b466015e1bc37b0" and quality "stable" for server
[16:22:38.612] Extensions to install: 
[16:22:38.616] Install and start server if needed
[16:22:38.618] Checking ssh with "C:\Python313\Scripts\ssh.exe -V"
[16:22:38.621] Got error from ssh: spawn C:\Python313\Scripts\ssh.exe ENOENT
[16:22:38.621] Checking ssh with "C:\Python313\ssh.exe -V"
[16:22:38.622] Got error from ssh: spawn C:\Python313\ssh.exe ENOENT
[16:22:38.622] Checking ssh with "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9\bin\ssh.exe -V"
[16:22:38.622] Got error from ssh: spawn C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9\bin\ssh.exe ENOENT
[16:22:38.622] Checking ssh with "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9\libnvvp\ssh.exe -V"
[16:22:38.623] Got error from ssh: spawn C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9\libnvvp\ssh.exe ENOENT
[16:22:38.623] Checking ssh with "C:\Program Files\Common Files\Oracle\Java\javapath\ssh.exe -V"
[16:22:38.624] Got error from ssh: spawn C:\Program Files\Common Files\Oracle\Java\javapath\ssh.exe ENOENT
[16:22:38.624] Checking ssh with "C:\WINDOWS\system32\ssh.exe -V"
[16:22:38.624] Got error from ssh: spawn C:\WINDOWS\system32\ssh.exe ENOENT
[16:22:38.624] Checking ssh with "C:\WINDOWS\ssh.exe -V"
[16:22:38.625] Got error from ssh: spawn C:\WINDOWS\ssh.exe ENOENT
[16:22:38.625] Checking ssh with "C:\WINDOWS\System32\Wbem\ssh.exe -V"
[16:22:38.626] Got error from ssh: spawn C:\WINDOWS\System32\Wbem\ssh.exe ENOENT
[16:22:38.626] Checking ssh with "C:\WINDOWS\System32\WindowsPowerShell\v1.0\ssh.exe -V"
[16:22:38.626] Got error from ssh: spawn C:\WINDOWS\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT
[16:22:38.626] Checking ssh with "C:\WINDOWS\System32\OpenSSH\ssh.exe -V"
[16:22:38.688] > OpenSSH_for_Windows_9.5p1, LibreSSL 3.8.2

[16:22:38.692] Using SSH config file "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config"
[16:22:38.692] Running script with connection command: "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -D 56835 -F "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config" "8xA800" sh
[16:22:38.694] Generated SSH command: 'type "C:\Users\psp_dada\AppData\Local\Temp\vscode-linux-multi-line-command-8x-800-90979931.sh" | "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -D 56835 -F "D:\OneDrive - stu.hit.edu.cn\backup\.ssh\config" "8xA800" sh'
[16:22:38.694] Using connect timeout of 17 seconds
[16:22:38.695] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[16:22:39.697] > 
[16:22:39.697] Got some output, clearing connection timeout
[16:22:39.994] > 968feb2e4d97: running
> Script executing under PID: 466394
[16:22:40.022] > Found existing installation at /data3/zhuotaotian/psp/.vscode-server...
> Starting VS Code CLI...
> Removing old logfile at /data3/zhuotaotian/psp/.vscode-server/.cli.c306e94f98122556ca081f527b466015e1bc37b0.log
> Spawned remote CLI: 466412
> Waiting for server log...
[16:22:40.053] > 968feb2e4d97: start
> listeningOn==127.0.0.1:39835==
> osReleaseId==ubuntu==
> arch==x86_64==
> vscodeArch==x64==
> bitness==64==
> tmpDir==/run/user/1009==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==41==
> execServerToken==111aa111-11aa-11a1-aaaa-11111aa11111==
> platformDownloadPath==cli-alpine-x64==
> SSH_AUTH_SOCK====
> DISPLAY====
> 968feb2e4d97: end
[16:22:40.053] Received install output: 
listeningOn==127.0.0.1:39835==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1009==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==41==
execServerToken==111aa111-11aa-11a1-aaaa-11111aa11111==
platformDownloadPath==cli-alpine-x64==
SSH_AUTH_SOCK====
DISPLAY====

[16:22:40.054] Remote server is listening on port 39835
[16:22:40.054] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":39835},"osReleaseId":"ubuntu","arch":"x86_64","sshAuthSock":"","display":"","tmpDir":"/run/user/1009","platform":"linux","execServerToken":"111aa111-11aa-11a1-aaaa-11111aa11111"},"serverStartTime":41,"installUnpackCode":""}
[16:22:40.057] Starting forwarding server. local port 56840 -> socksPort 56835 -> remotePort 39835
[16:22:40.058] Forwarding server listening on port 56840
[16:22:40.058] Waiting for ssh tunnel to be ready
[16:22:40.060] [Forwarding server port 56840] Got connection 0
[16:22:40.061] Tunneled port 39835 to local port 56840
[16:22:40.061] Resolved "ssh-remote+7b22686f73744e616d65223a22387841383030227d" to "port 56840"
[16:22:40.067] Initizing new exec server for ssh-remote+7b22686f73744e616d65223a22387841383030227d
[16:22:40.067] Resolving exec server at port 56840
[16:22:40.069] [Forwarding server port 56840] Got connection 1
[16:22:40.362] Failed to set up socket for dynamic port forward to remote port 39835: connect ETIMEDOUT 127.0.0.1:56835. TCP port forwarding may be disabled, or the remote server may have crashed. See the VS Code Server log above for details.
[16:22:40.378] Failed to set up socket for dynamic port forward to remote port 39835: connect ETIMEDOUT 127.0.0.1:56835. TCP port forwarding may be disabled, or the remote server may have crashed. See the VS Code Server log above for details.

Steps To Reproduce
Host 8xA800
    HostName 10.249.46.87
    User psp

I can SSH 8xA800, and it returns

Welcome to Ubuntu 22.04.5 LTS (GNU/Linux 6.8.0-59-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/pro

Expanded Security Maintenance for Applications is not enabled.

90 updates can be applied immediately.
To see these additional updates run: apt list --upgradable

27 additional security updates can be applied with ESM Apps.
Learn more about enabling ESM Apps service at https://ubuntu.com/esm

New release '24.04.2 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

*** System restart required ***
Last login: Sun Jul 27 16:12:09 2025 from 10.250.224.75
Anything else?

Environment:

Visual Studio Code
版本: 1.102.2
提交: c306e94f98122556ca081f527b466015e1bc37b0
日期: 2025-07-22T12:15:48.520Z (4 天前)
浏览器: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.102.2 Chrome/134.0.6998.205 Electron/35.6.0 Safari/537.36

Remote - SSH  v0.121.2025071515 (pre-release) 

设备名称	psp-dada
处理器	12th Gen Intel(R) Core(TM) i7-12700H (2.30 GHz)
机带 RAM	32.0 GB (31.7 GB 可用)
设备 ID	4B9CEE13-266F-4FC4-B335-D169B175A376
产品 ID	00330-80000-00000-AA515
系统类型	64 位操作系统, 基于 x64 的处理器
笔和触控	没有可用于此显示器的笔或触控输入


版本	Windows 11 专业版
版本号	24H2
安装日期	‎2025/‎5/‎31
操作系统版本	26100.4770
体验	Windows 功能体验包 1000.26100.197.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the Remote-SSH extension and inspect the generated OpenSSH tunnel command and Remote-SSH log. The issue is resolved when the dynamic port forward connects to the remote VS Code server without the reported localhost timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
devtools, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.