VS Code Remote SSH Could Not Establish Connection

Share
Workaround available Windows, macOS, Linux Updated November 13, 2026Based on 3 user reportsHow we research

Quick answer

First confirm plain ssh works, then delete the VS Code server on the remote and try the remote.SSH.useLocalServer setting both ways. Read the Remote-SSH log for the failing step.

Most likely fix: Test SSH outside VS Code

How to fix it

Try these in order — the most common fix is first.

  1. 1. Test SSH outside VS Code

    1. Run ssh -v user@host in a terminal
    2. Fix key, host or port problems shown there
    Did this fix it?
  2. 2. Read the Remote-SSH log

    1. Open the Output panel and select Remote - SSH
    2. Find the first failing line
    Did this fix it?
  3. 3. Reinstall the server on the remote

    1. SSH in manually and delete the ~/.vscode-server folder
    2. Reconnect so VS Code reinstalls it
    Did this fix it?
  4. 4. Toggle remote.SSH.useLocalServer

    1. Try true and false; reports differ by environment
    2. One report also set remote.SSH.useExecServer to true
    Did this fix it?
  5. 5. Use full key paths

    1. Set IdentityFile in ~/.ssh/config to a full path
    2. On Windows use the system OpenSSH client, not PuTTY
    Did this fix it?

Symptoms

Remote - SSH shows 'Could not establish connection to host' or a resolver error.

Why it happens

  • SSH itself failing (keys, host, firewall)
  • VS Code server version mismatch after an update
  • Wrong IdentityFile path
  • Windows without the system OpenSSH client
  • Local server setting incompatible with your environment

This guide also covers

  • vscode remote ssh could not establish connection
  • vscode remote ssh resolver error

Still not working?

If VS Code keeps failing, you're not alone. See every VS Code problem users report or the alternatives people switch to.

Need a custom web app or internal tool? Our small team builds it, on your domain or hosted by us. Price agreed together.

Get a quote
Fixed it? Share this guide

The same problem in other apps

All not loading, error messages & connection guides →

Other VS Code errors

All 12 VS Code errors and fixes →