Fix for “An SSH Installation Couldn’t Be Found” Error When Connecting to a Remote Server in VS Code

Operating System: Windows 10

When using the Remote-SSH extension in VS Code for remote development, you might encounter the error message “An SSH installation couldn’t be found” during the first connection attempt to a remote server. This error indicates that the VS Code Remote-SSH extension cannot find ssh.exe in your Windows system.

By default, VS Code looks for the ssh command in the system’s PATH environment variable. If it’s not found, this error occurs.

One solution is to install the Git package on your Windows system, which includes ssh.exe. Then, you can specify the exact path to ssh.exe in the settings of the VS Code Remote-SSH extension by configuring the remote.SSH.path option. Here’s how:

  1. Install the Git package, which includes ssh.exe.
  2. In VS Code, press F1 -> type Remote-SSH: Settings and hit Enter. This will open the Remote-SSH configuration file.
  3. Locate the remote.SSH.path option and set its value to the absolute path of ssh.exe on your Windows system. For example:
C:\Programs\Git\usr\bin\ssh.exe

Alternatively, you can install the OpenSSH package, which also includes ssh.exe, and use that instead of the Git-provided version.