VS Code Remote SSH Could Not Establish Connection
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. Test SSH outside VS Code
- Run ssh -v user@host in a terminal
- Fix key, host or port problems shown there
Did this fix it?2. Read the Remote-SSH log
- Open the Output panel and select Remote - SSH
- Find the first failing line
Did this fix it?3. Reinstall the server on the remote
- SSH in manually and delete the ~/.vscode-server folder
- Reconnect so VS Code reinstalls it
Did this fix it?4. Toggle remote.SSH.useLocalServer
- Try true and false; reports differ by environment
- One report also set remote.SSH.useExecServer to true
Did this fix it?5. Use full key paths
- Set IdentityFile in ~/.ssh/config to a full path
- 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