The Error
You open VS Code, click a saved SSH host in the Remote Explorer, and get hit with:
Could not establish connection to remote host. An SSH installation couldn't be found.
No stack trace. No hint. The connection window closes and you're staring at an empty editor.
What's Actually Happening
Remote - SSH doesn't bundle its own SSH client. It relies on a local ssh binary already on your machine โ specifically, one that's reachable via your system PATH. When VS Code can't find that binary (or finds a different PATH than your terminal does), you hit this wall.
The usual suspects:
- On Windows: OpenSSH Client optional feature is not enabled
- On Windows: Git for Windows ships its own SSH, but it's not in the PATH VS Code checks
- On macOS/Linux: SSH is installed but the executable path isn't in VS Code's environment PATH
- VS Code setting
remote.SSH.pathis pointing to a path that no longer exists
Quick Diagnosis
Before touching any settings, confirm SSH is actually on your system. Open your system terminal or PowerShell โ not the VS Code integrated terminal:
ssh -V
Got something like OpenSSH_8.9p1, LibreSSL 3.3.6? SSH is installed. VS Code just can't locate it.Got command not found or nothing at all? SSH isn't installed yet. Start with the install steps below.
Fix on Windows
Option 1: Enable OpenSSH Client (Recommended)
Windows 10 and 11 ship OpenSSH as a built-in optional feature โ it's just off by default. Enable it from PowerShell (run as Administrator):
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH.Client*'
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Prefer clicking? Go to Settings โ Apps โ Optional Features โ Add a feature โ OpenSSH Client โ Install.
Either way, verify it worked:
ssh -V
# Expected: OpenSSH_for_Windows_8.x, LibreSSL x.x.x
Do a full VS Code restart after this โ not just closing the window, but killing it from the taskbar tray too. The error should disappear.
Option 2: Point VS Code to Git's SSH
Git for Windows bundles SSH at C:\Program Files\Git\usr\bin\ssh.exe. VS Code won't find it automatically, but you can tell it exactly where to look.
Open settings (Ctrl+,), search for remote.SSH.path, and paste that path in. Or edit settings.json directly:
{
"remote.SSH.path": "C:\\Program Files\\Git\\usr\\bin\\ssh.exe"
}
Option 3: Add SSH to PATH manually
OpenSSH installs to C:\Windows\System32\OpenSSH\ by default, but that directory sometimes gets left out of PATH. Fix it in PowerShell (as Administrator):
[System.Environment]::SetEnvironmentVariable(
'Path',
$env:Path + ';C:\Windows\System32\OpenSSH',
[System.EnvironmentVariableTarget]::Machine
)
Restart VS Code after this.
Fix on macOS
macOS has SSH built in at /usr/bin/ssh, but VS Code can inherit a stripped-down PATH that doesn't include it โ especially if you launch VS Code from the Dock rather than the terminal.
Step 1: Find where SSH lives
which ssh
# Usually: /usr/bin/ssh
Step 2: Pin the path in VS Code settings
{
"remote.SSH.path": "/usr/bin/ssh"
}
Running a Homebrew-installed OpenSSH? The path will be different:
which ssh
# /opt/homebrew/bin/ssh (Apple Silicon)
# /usr/local/bin/ssh (Intel Mac)
Use whatever which ssh returns โ don't guess.
Fix on Linux
The client package is often missing on minimal server installs or freshly provisioned containers. Install it with your package manager:
# Debian/Ubuntu
sudo apt update && sudo apt install openssh-client
# Fedora/RHEL
sudo dnf install openssh-clients
# Arch
sudo pacman -S openssh
Confirm it's working:
which ssh && ssh -V
Check for Conflicting Settings
A stale remote.SSH.path entry is a sneaky cause of this error. If you set a custom path months ago and that binary moved or was deleted, VS Code silently fails here.
Open settings.json and look for this line:
// Remove or update if the path is wrong
"remote.SSH.path": "/old/path/to/ssh" // <-- delete this if SSH is now in PATH
Deleting the setting entirely lets VS Code auto-detect SSH from PATH again.
Verify the Fix
- Close all VS Code windows completely (including remote windows)
- Reopen VS Code
- Open the Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) - Run Remote-SSH: Connect to Host...
- Select your host
The connection progress notification should appear and your remote window should open cleanly. Want to confirm exactly which SSH binary VS Code picked up? Open the Output panel (Ctrl+Shift+U), select Remote - SSH from the dropdown, and look for:
[info] SSH executable: /usr/bin/ssh
Still Broken?
Worked through everything above and still hitting the wall? A few more things worth checking:
- Reinstall the Remote - SSH extension: Uninstall from the Extensions panel, reload VS Code, then reinstall. Corrupted extension state causes this more often than you'd expect.
- Check VS Code version: Remote - SSH requires VS Code 1.35+. Run
code --versionโ anything older than that won't work regardless of SSH state. - Disable other extensions temporarily: VPN clients and proxy extensions sometimes intercept SSH path resolution. Try disabling everything except Remote - SSH and test again.
- Read the raw logs: Output panel โ Remote - SSH shows exactly which paths were searched during connection. That log usually points directly at the real problem.

