gpt4 book ai didi

visual-studio-code - 无法使用 Remote-SSH : "spawn UNKNOWN" 远程连接

转载 作者:行者123 更新时间:2023-12-05 06:08:17 26 4
gpt4 key购买 nike

我正在尝试通过 VSCode(在 WSL 上启动)远程连接到服务器(在 Ubuntu 16.04.7 LTS 上运行)。

我已经在 VSCode Remote-SSH 中设置了我的 WSL 配置文件(里面有 SSH key )的路径。

我可以通过终端和 VSCode 终端访问并连接到服务器。

然而,当我尝试通过 Remote-SSH 连接时,我收到了消息

Failed to connect to the remote extension host server (Error: spawn UNKNOWN)

错误日志如下:

[13:50:42.906] Log Level: 2
[13:50:42.922] remote-ssh@0.56.0
[13:50:42.922] win32 x64
[13:50:42.925] SSH Resolver called for "ssh-remote+<net>.net", attempt 1
[13:50:42.925] SSH Resolver called for host: <net>.net
[13:50:42.926] Setting up SSH remote "<net>.net"
[13:50:42.970] Using commit id "<CommitID>" and quality "stable" for server
[13:50:42.974] Install and start server if needed
[13:50:44.876] Checking ssh with "ssh -V"
[13:50:44.888] Finding installed ssh failed: spawn UNKNOWN
[13:50:44.897] Resolver error: Error: spawn UNKNOWN
at ChildProcess.spawn (internal/child_process.js:394:11)
at Object.spawn (child_process.js:549:9)
at c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:242426
at new Promise (<anonymous>)
at q (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:242347)
at k (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:242298)
at _ (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:245580)
at P (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:245741)
at O (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:242117)
at C (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:242026)
at Object.t.generateMultiLineCommand (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:1:243396)
at q (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:107623)
at c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:105016
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at async Object.t.withShowDetailsEvent (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:110096)
at async Object.t.resolve (c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:108158)
at async c:\Users\<user>\.vscode\extensions\ms-vscode-remote.remote-ssh-0.56.0\out\extension.js:127:143767
[13:50:44.908] ------

已经尝试按照建议远程手动设置 vscode 服务器 here

在此先感谢您的帮助!

最佳答案

更新似乎搞砸了。我通过重新安装 Remote SSH extension: ms-vscode-remote.remote-ssh 并按照指示重新加载来修复它。我还刚刚安装了整个 远程开发扩展:ms-vscode-remote.vscode-remote-extensionpack 并按照 vscode 的指示重新加载了 vscode。

虽然在此之前,我删除了 (rm -rf)/home/ /.vscode-server/bin/和 data/的内容

关于visual-studio-code - 无法使用 Remote-SSH : "spawn UNKNOWN" 远程连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65144097/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com