Immediate Fix
If your Windows system crashes into a Blue Screen of Death (BSOD) the moment you initiate a VS Code Remote SSH connection, the most common culprit is a driver conflict with the network stack or an outdated OpenSSH client.
Start by updating your local OpenSSH client. Windows 10 and 11 often ship with an older version that struggles with the specific key exchange methods used by modern VS Code extensions.
# Run in PowerShell as Administrator to update OpenSSH
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Next, disable “Remote.SSH.useLocalServer” in your VS Code settings. Go to Settings (Ctrl + ,), search for remote.ssh.useLocalServer, and uncheck the box. This prevents VS Code from attempting to spawn a local server process that often triggers kernel-level network crashes.
| Error Code | Potential Cause | Quick Action |
|---|---|---|
| IRQL_NOT_LESS_OR_EQUAL | Network Driver Conflict | Update Wi-Fi/Ethernet Drivers |
| SYSTEM_SERVICE_EXCEPTION | OpenSSH Binary Corrupt | Reinstall OpenSSH Feature |
| KMODE_EXCEPTION_NOT_HANDLED | Extension Conflict | Disable non-essential extensions |
Technical Explanation
The VS Code Remote SSH extension creates a persistent tunnel using the SSH protocol. Unlike standard terminal-based SSH, VS Code pipes a significant amount of data for file indexing and extension synchronization. This high-frequency data transfer can expose bugs in the tcpip.sys or netio.sys kernel drivers.
When the Remote SSH extension attempts to establish a multiplexed connection, it may invoke specific Windows Socket (Winsock) calls that outdated drivers cannot handle properly, resulting in an immediate kernel panic (BSOD).
Furthermore, if you are using a VPN or a third-party firewall, the interaction between the SSH tunnel and the virtual network adapter often leads to memory corruption at the driver level.
# Check your SSH version to ensure it is 8.0 or higher
ssh -V

Alternative Methods
If updating drivers and OpenSSH doesn’t resolve the BSOD, you should move away from standard SSH tunneling to more stable protocols supported by the VS Code ecosystem.
Switch to Remote Tunnels
VS Code now offers “Remote Tunnels,” which do not rely on the local OpenSSH binary. By running code tunnel on your remote server, you can connect via the Microsoft relay service, bypassing the local network stack issues that trigger crashes.
Use WSL2 as a Bridge
Instead of connecting directly from Windows, initiate the SSH connection from within a WSL2 (Windows Subsystem for Linux) instance. WSL2 handles network interrupts differently than the native Windows kernel, often providing a stable buffer that prevents the host system from crashing.
Downgrade Remote-SSH Extension
In some cases, the latest version of the “Remote – SSH” extension contains regressions. Open the Extensions view in VS Code, click the gear icon next to Remote – SSH, and select “Install Another Version…” to roll back to a release from 2-3 months ago.