VS Code连接远程服务器时弹出an ssh installation couldn’t be found对话框的解决方法

我的操作系统是Windows 10。

在VS Code中安装Remote-SSH扩展进行远程开发,首次连接远程服务器时出现an ssh installation couldn’t be found对话框,该错误表明VS Code Remote-SSH扩展在Windows系统中找不到ssh.exe。

VS Code默认将在PATH环境变量中查找ssh命令,如果找不到,就会出现上述错误。

可以先在Windows系统中安装Git软件包,它会同时安装ssh.exe,然后在VS Code Remote-SSH扩展的设置里,将remote.SSH.path配置项的值设置为ssh.exe在Windows系统里的绝对路径,明确告诉VS Code SSH客户端的位置,具体步骤为:

在VS Code中按下F1键 -> 输入Remote-SSH:Settings后回车,打开Remote-SSH的配置文件 -> 找到remote.SSH.path配置项,填入ssh.exe在Windows系统中的绝对路径,例如:C:\Programs\Git\usr\bin\ssh.exe

除了使用Git软件包包含的ssh.exe外,也可以安装OpenSSH软件包,使用它包含的ssh.exe。

“VS Code连接远程服务器时弹出an ssh installation couldn’t be found对话框的解决方法”的22个回复

  1. I constantly spent my half an hour to read
    this web site’s articles all the time along with a mug of coffee.

  2. Thanks for a marvelous posting! I quite enjoyed reading it,
    you’re a great author. I will always bookmark
    your blog and definitely will come back at some point. I want
    to encourage you to ultimately continue your great posts, have a nice holiday weekend!

发表评论

邮箱地址不会被公开。 必填项已用*标注