Windows11下VSCode通过SSH连接远程VM失败求助
VSCode SSH连接远程虚拟机超时并提示“过程试图写入的管道不存在”
Windows11系统中使用VSCode通过SSH连接远程虚拟机,起初连接正常,突然断开后无法重新连接。日志显示连接到主机10.191.72.107的22端口超时,同时出现“过程试图写入的管道不存在”提示。
已尝试以下排查步骤,但问题仍未解决:
- 删除known_hosts文件
- 确认SSH配置正确
- 执行“Kill VS Code Server on Host”操作并重启VSCode
相关日志
[21:46:53.937] Log Level: 2 [21:46:53.945] SSH Resolver called for "ssh-remote+10.191.72.107", attempt 1 [21:46:53.945] "remote.SSH.useLocalServer": false [21:46:53.945] "remote.SSH.useExecServer": false [21:46:53.946] "remote.SSH.showLoginTerminal": true [21:46:53.946] "remote.SSH.remotePlatform": {"10.191.72.107":"linux"} [21:46:53.946] "remote.SSH.path": undefined [21:46:53.946] "remote.SSH.configFile": undefined [21:46:53.946] "remote.SSH.useFlock": true [21:46:53.946] "remote.SSH.lockfilesInTmp": false [21:46:53.946] "remote.SSH.localServerDownload": auto [21:46:53.946] "remote.SSH.remoteServerListenOnSocket": false [21:46:53.946] "remote.SSH.showLoginTerminal": true [21:46:53.947] "remote.SSH.defaultExtensions": [] [21:46:53.947] "remote.SSH.loglevel": 2 [21:46:53.947] "remote.SSH.enableDynamicForwarding": true [21:46:53.947] "remote.SSH.enableRemoteCommand": false [21:46:53.947] "remote.SSH.serverPickPortsFromRange": {} [21:46:53.950] "remote.SSH.serverInstallPath": {} [21:46:53.953] VS Code version: 1.85.2 [21:46:53.953] Remote-SSH version: remote-ssh@0.107.1 [21:46:53.953] win32 x64 [21:46:53.954] SSH Resolver called for host: 10.191.72.107 [21:46:53.954] Setting up SSH remote "10.191.72.107" [21:46:53.957] Using commit id "8b3775030ed1a69b13e4f4c628c612102e30a681" and quality "stable" for server [21:46:53.960] Install and start server if needed [21:46:53.962] Checking ssh with "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\ssh.exe -V" [21:46:53.964] Got error from ssh: spawn C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\ssh.exe ENOENT [21:46:53.964] Checking ssh with "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\libnvvp\ssh.exe -V" [21:46:53.965] Got error from ssh: spawn C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\libnvvp\ssh.exe ENOENT [21:46:53.965] Checking ssh with "D:\Develop\VMware\bin\ssh.exe -V" [21:46:53.966] Got error from ssh: spawn D:\Develop\VMware\bin\ssh.exe ENOENT [21:46:53.966] Checking ssh with "D:\Develop\nodejs\node_global\node_modules\ssh.exe -V" [21:46:53.966] Got error from ssh: spawn D:\Develop\nodejs\node_global\node_modules\ssh.exe ENOENT [21:46:53.966] Checking ssh with "D:\Develop\apache-maven-3.6.1\bin\ssh.exe -V" [21:46:53.967] Got error from ssh: spawn D:\Develop\apache-maven-3.6.1\bin\ssh.exe ENOENT [21:46:53.967] Checking ssh with "D:\chrome下载\snipaste\ssh.exe -V" [21:46:53.968] Got error from ssh: spawn D:\chrome下载\snipaste\ssh.exe ENOENT [21:46:53.968] Checking ssh with "C:\Program Files\Common Files\Oracle\Java\javapath\ssh.exe -V" [21:46:53.969] Got error from ssh: spawn C:\Program Files\Common Files\Oracle\Java\javapath\ssh.exe ENOENT [21:46:53.969] Checking ssh with "C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin\ssh.exe -V" [21:46:53.970] Got error from ssh: spawn C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin\ssh.exe ENOENT [21:46:53.970] Checking ssh with "C:\Windows\system32\ssh.exe -V" [21:46:53.971] Got error from ssh: spawn C:\Windows\system32\ssh.exe ENOENT [21:46:53.971] Checking ssh with "C:\Windows\ssh.exe -V" [21:46:53.972] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT [21:46:53.972] Checking ssh with "C:\Windows\System32\Wbem\ssh.exe -V" [21:46:53.972] Got error from ssh: spawn C:\Windows\System32\Wbem\ssh.exe ENOENT [21:46:53.973] Checking ssh with "C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V" [21:46:53.973] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT [21:46:53.973] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V" [21:46:54.006] > OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2 [21:46:54.010] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 58774 "10.191.72.107" bash [21:46:54.012] Terminal shell path: C:\WINDOWS\System32\cmd.exe [21:47:15.394] > ssh: connect to host 10.191.72.107 port 22: Connection timed out > ]0;C:\WINDOWS\System32\cmd.exe [21:47:15.394] Got some output, clearing connection timeout [21:47:15.411] > [8;16;50tssh: connect to host 10.191.72.107 port 22: Connection timed out > 过程试图写入的管道不存在。 [21:47:16.665] "install" terminal command done [21:47:16.665] Install terminal quit with output: 过程试图写入的管道不存在。 [21:47:16.665] Received install output: 过程试图写入的管道不存在。 [21:47:16.666] Failed to parse remote port from server output [21:47:16.667] Resolver error: Error: at g.Create (d:\Develop\VS Code\.vscode\extensions\ms-vscode-remote.remote-ssh-0.107.1\out\extension.js:2:642703) at t.handleInstallOutput (d:\Develop\VS Code\.vscode\extensions\ms-vscode-remote.remote-ssh-0.107.1\out\extension.js:2:640069) at t.tryInstall (d:\Develop\VS Code\.vscode\extensions\ms-vscode-remote.remote-ssh-0.107.1\out\extension.js:2:761983) at async d:\Develop\VS Code\.vscode\extensions\ms-vscode-remote.remote-ssh-0.107.1\out\extension.js:2:722522 at async t.withShowDetailsEvent (d:\Develop\VS Code\.vscode\extensions\ms-vscode-remote.remote-ssh-0.107.1\out\extension.js:2:725828) at async I (d:\Develop\VS Code\.vscode\extensions\ms-vscode-remote.remote-ssh-0.107.1\out\extension.js:2:719493) at async t.resolve (d:\Develop\VS Code\.vscode\extensions\ms-vscode-remote.remote-ssh-0.107.1\out\extension.js:2:723199) at async d:\Develop\VS Code\.vscode\extensions\ms-vscode-remote.remote-ssh-0.107.1\out\extension.js:2:907003 [21:47:16.671] ------
SSH配置信息
Host 00.00.00.00 HostName 00.00.00.00 User root Port 22
内容的提问来源于stack exchange,提问作者Flora
相关产品推荐
相关产品推荐

