Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
On Windows, the SSH Targets gear (Open SSH Configuration File) opens and lists hosts from Node os.homedir()/.ssh/config, which is %USERPROFILE%.ssh\config.
When remote.SSH.configFile is empty, the connect command does not pass -F. The Remote - SSH log shows:
ssh -T -D bash --login -c bash
If the ssh on PATH is MSYS2 or Git Bash ssh.exe, that client uses its own HOME and a different ~/.ssh/config, not %USERPROFILE%.ssh\config.
I changed HostName in the file the gear opened. The SSH Targets list reflected that edit. The connection still used the old HostName from the other config, so Remote SSH failed (timeout / connection reset to the old address) while an ssh command that explicitly used the Windows config file succeeded.
Steps to Reproduce
- Put MSYS2 or Git Bash ssh.exe earlier on PATH than Windows OpenSSH, with a different HOME and a different ~/.ssh/config than %USERPROFILE%.ssh\config.
- Leave remote.SSH.configFile unset.
- In SSH Targets, use the gear to open the SSH config and change a host’s HostName.
- Connect to that host from the SSH Targets list.
- Compare HostName in %USERPROFILE%.ssh\config with the config under that ssh client’s HOME, and with the Remote - SSH output channel.
Expected Behavior
The SSH config file opened and listed by Remote SSH should be the file passed to ssh with -F, even when remote.SSH.configFile is unset. Editing HostName from the gear should be what the connection uses.
Operating System
Windows 10/11
Version Information
Cursor 3.21.9 (stable), Windows 11 (10.0.26100) x64. Remote - SSH extension anysphere.remote-ssh 1.1.15.
Additional Information
Workaround: set remote.SSH.configFile to the absolute path of %USERPROFILE%.ssh\config so the extension adds -F. Extension source only appends -F when that setting is non-empty (sshConfigPath), while the host list and Open SSH Configuration File use os.homedir()/.ssh/config.
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor