VScode SSH Remote出现an SSH installation couldn‘t be found

本文介绍了解决Win10环境下使用VSCode通过SSH远程连接服务器时遇到的问题,主要针对提示“anSSHinstallationcouldn’tbefound”的情况。提供了两种解决方案:一是安装SSH服务,二是正确配置SSH路径。

win10 VScode远程连接服务器时出现an SSH installation couldn’t be found

有两种可能:

  1. 未安装ssh服务
  2. 未配置ssh路径

安装ssh服务

安装ssh可选择openssh或者git,
这个是安装ssh的教程,需要在管理员模式下的命令行进行(右键点击左下角windows图标即有选项)

配置ssh路径

两种方法

  1. 打开vscode的setting.json,加入
    "remote.SSH.path": "C:\\Program Files\\OpenSSH\\ssh.exe"
    注意后面应为你自己的ssh安装路径
  2. 将ssh安装路径的文件夹加入环境变量(这个我自己试过却没有成功)
[2025-09-24 07:48:33.807] Extension version: 0.104.2 [2025-09-24 07:48:33.808] L10N bundle: file:///c%3A/Users/a/.vscode/extensions/ms-vscode-remote.remote-wsl-0.104.2/l10n/bundle.l10n.zh-cn.json [2025-09-24 07:48:33.817] authorityHierarchy: wsl+Ubuntu-18.04 [2025-09-24 07:48:33.817] WSL extension activating for a local WSL instance [2025-09-24 07:48:33.843] Download in background is enabled [2025-09-24 07:48:33.844] Resolving wsl+Ubuntu-18.04, resolveAttempt: 1 [2025-09-24 07:48:33.844] NodeExecServer run: C:\WINDOWS\System32\wsl.exe --status [2025-09-24 07:48:33.912] WSL feature installed: true (wsl --status), using utf-8 encoding [2025-09-24 07:48:33.913] NodeExecServer run: C:\WINDOWS\System32\wsl.exe --list --verbose [2025-09-24 07:48:33.958] 1 distros found [2025-09-24 07:48:33.959] Starting VS Code Server inside WSL (wsl2) [2025-09-24 07:48:33.959] Windows build: 26100. Multi distro support: available. WSL path support: enabled [2025-09-24 07:48:33.960] Scriptless setup: false [2025-09-24 07:48:33.960] No shell environment set or found for current distro. [2025-09-24 07:48:34.098] WSL daemon log file: [2025-09-24 07:48:34.100] Probing if server is already installed: if [ -d ~/.vscode-server/bin/f220831ea2d946c0dcb0f3eaa480eb435a2c1260 ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf 'alpine-'; fi; uname -m; [2025-09-24 07:48:34.101] NodeExecServer run: C:\WINDOWS\System32\wsl.exe -d Ubuntu-18.04 -e sh -c if [ -d ~/.vscode-server/bin/f220831ea2d946c0dcb0f3eaa480eb435a2c1260 ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf 'alpine-'; fi; uname -m; [2025-09-24 07:48:42.124] Probing result: x86_64 [2025-09-24 07:48:42.125] No server install found in WSL, needs linux-x64 [2025-09-24 07:48:42.125] Getting server from client side [2025-09-24 07:48:42.126] Downloading VS Code Server stable - f220831ea2d946c0dcb0f3eaa480eb435a2c1260 into C:\Users\a\vscode-remote-wsl\stable\f220831ea2d946c0dcb0f3eaa480eb435a2c1260\vscode-server-stable-linux-x64.tar.gz. [2025-09-24 07:48:42.164] Unable to download server on client side: Error: Request downloadRequest failed with message: read ECONNRESET. Will try to download on WSL side. [2025-09-24 07:48:42.165] NodeExecServer run: C:\WINDOWS\System32\wsl.exe -d Ubuntu-18.04 sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" f220831ea2d946c0dcb0f3eaa480eb435a2c1260 stable code-server .vscode-server --host=127.0.0.1 --port=0 --connection-token=2492281583-3324208731-904610584-1391618391 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all' [2025-09-24 07:48:42.354] Setting up server environment: Looking for /home/xyx/.vscode-server/server-env-setup. Not found. [2025-09-24 07:48:42.354] WSL version: 6.6.87.2-microsoft-standard-WSL2 Ubuntu-18.04 [2025-09-24 07:48:42.354] Updating VS Code Server to version f220831ea2d946c0dcb0f3eaa480eb435a2c1260 [2025-09-24 07:48:42.354] Removing previous installation... [2025-09-24 07:48:42.354] Installing VS Code Server for Linux x64 (f220831ea2d946c0dcb0f3eaa480eb435a2c1260) [2025-09-24 07:48:42.354] Downloading: 100% [2025-09-24 07:48:42.354] Failed [2025-09-24 07:48:42.355] --2025-09-24 15:48:42-- https://update.code.visualstudio.com/commit:f220831ea2d946c0dcb0f3eaa480eb435a2c1260/server-linux-x64/stable [2025-09-24 07:48:42.355] Connecting to 127.0.0.1:50778... connected. [2025-09-24 07:48:42.355] Unable to establish SSL connection. [2025-09-24 07:48:42.355] ERROR: Failed to download https://update.code.visualstudio.com/commit:f220831ea2d946c0dcb0f3eaa480eb435a2c1260/server-linux-x64/stable to /home/xyx/.vscode-server/bin/f220831ea2d946c0dcb0f3eaa480eb435a2c1260-1758700122.tar.gz [2025-09-24 07:48:42.355] 有关启动问题的帮助,请转到 https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
09-25
评论 3
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

三更鬼

谢谢老板!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值