You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VS Code升级至1.86.0后Remote-SSH连接失败,VS Code Server启动异常

VS Code 1.86.0升级后Remote-SSH扩展无法连接,VS Code Server启动失败

问题现象

  • 升级VS Code后出现VS Code Server启动失败错误,终端大量刷屏显示Waiting for server log...
  • 升级至1.86.0版本后,Remote-SSH扩展无法建立连接,抛出Could not establish connection to ---错误
  • 输出窗口日志片段:
[13:46:24.025] Resolver error: Error: The VS Code Server failed to start
    at g.ServerInstallError (c:\Users\lpthomas\.vscode\extensions\ms-vscode-remote.remote-ssh-0.108.0\out\extension.js:2:460179)
    at d (c:\Users\lpthomas\.vscode\extensions\ms-vscode-remote.remote-ssh-0.108.0\out\extension.js:2:453522)
    at t.handleInstallOutput (c:\Users\lpthomas\.vscode\extensions\ms-vscode-remote.remote-ssh-0.108.0\out\extension.js:2:455792)
    at t.tryInstall (c:\Users\lpthomas\.vscode\extensions\ms-vscode-remote.remote-ssh-0.108.0\out\extension.js:2:581100)
    at async c:\Users\lpthomas\.vscode\extensions\ms-vscode-remote.remote-ssh-0.108.0\out\extension.js:2:540958
    at async t.withShowDetailsEvent (c:\Users\lpthomas\.vscode\extensions\ms-vscode-remote.remote-ssh-0.108.0\out\extension.js:2:544264)
    at async k (c:\Users\lpthomas\.vscode\extensions\ms-vscode-remote.remote-ssh-0.108.0\out\extension.js:2:537923)
    at async t.resolve (c:\Users\lpthomas\.vscode\extensions\ms-vscode-remote.remote-ssh-0.108.0\out\extension.js:2:541635)
    at async c:\Users\lpthomas\.vscode\extensions\ms-vscode-remote.remote-ssh-0.108.0\out\extension.js:2:807794
[13:46:24.032] ------

[13:46:25.301] "install" terminal command done
[13:46:25.301] Install terminal quit with output: 

解决方案

1. 降级Remote-SSH扩展版本

  • 打开VS Code扩展面板,找到Remote - SSH扩展
  • 点击扩展卡片右下角的齿轮图标,选择Install Another Version
  • 选择低于当前版本(比如0.107.0)的版本安装,重启VS Code后尝试连接

2. 清理VS Code Server缓存

  • 在远程服务器上,删除VS Code Server的缓存目录:
    rm -rf ~/.vscode-server
    
  • 本地端清理Remote-SSH缓存:
    • Windows:删除C:\Users\<你的用户名>\.vscode\extensions\ms-vscode-remote.remote-ssh-<版本号>目录,同时删除C:\Users\<你的用户名>\.ssh\vscode-ssh-hosts文件
    • macOS/Linux:删除~/.vscode/extensions/ms-vscode-remote.remote-ssh-<版本号>目录和~/.ssh/vscode-ssh-hosts文件
  • 重启VS Code后重新发起SSH连接

3. 回退VS Code版本到1.85.x

  • 下载VS Code 1.85.x版本安装包,卸载当前1.86.0版本后安装旧版本,再尝试使用Remote-SSH扩展

4. 检查SSH配置与权限

  • 确认本地~/.ssh/config(Windows为C:\Users\<你的用户名>\.ssh\config)中的远程主机配置正确,端口、用户名、地址无误
  • 远程服务器上检查~/.vscode-server目录权限,确保当前用户有读写权限:
    chown -R $USER:$USER ~/.vscode-server
    

内容的提问来源于stack exchange,提问作者Liju Thomas

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.01 02:10:29