remote.SSH.path quoting bug on Windows

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

The remote.SSH.path setting seemingly doesn’t like spaces in Windows paths.

From the settings.json this is what I have set:

{
  "remote.SSH.path": "C:\\Users\\alb\\OneDrive - Personal\\Documents\\Keys\\.ssh\\plink-wrapper.bat"
}

I then get the following error when trying to start SSH to a linux machine:

2026-06-15 11:47:55.131 [info] Waiting for SSH handshake (timeout: 120s). Install timeout: 30s.
2026-06-15 11:47:55.178 [info] (ssh_tunnel) stderr: 'C:\Users\alb\OneDrive' is not recognized as an internal or external command,
operable program or batch file.

The error logs suggests it has split the path provided on the first space and is only using that.

I use the same remote.SSH.path in VS Code and that handles the space as expected.
Note, that for the time being I have moved the .bat file to a folder structure that does not include a space which has resolved the problem.
I’m using the latest version of “Remote - SSH” (v1.1.3)

Steps to Reproduce

  1. Install Cursor on a Windows machine
  2. Set a remote.SSH.path that contains a space
  3. Connect to any remote machine via SSH

Expected Behavior

It should not error and use the full path escape the path / spaces as needed

Operating System

Windows 10/11

Version Information

Version: 3.7.36 (user setup)
VS Code Extension API: 1.105.1
Commit: 776d1f9d76df50a4e0aeca61819a88e7c1b861e0
Date: 2026-06-13T00:31:56.287Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
xterm.js: 6.1.0-beta.256
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hi! Thanks for the clear write-up and the logs — that made this easy to confirm.

This is a bug on our side, not your setup. On Windows, when remote.SSH.path points to an executable whose path contains a space, the path isn’t being quoted properly, so it gets split at the first space (which is why you saw 'C:\Users\alb\OneDrive' is not recognized…). VS Code quotes it, so the same setting works there.

Your workaround is the right one for now: keep the .bat on a path without spaces. I’ve raised this with the team that maintains the Remote-SSH extension so the path gets quoted correctly.

I’ll follow up here once a fix ships.