Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Cursor’s Remote SSH reconnects (full connection + MFA on each attempt) for new windows, new remote folders, and window reload. VS Code + Remote - SSH does not force that on each action. Please fix this behaviour so the same host isn’t treated as a fresh SSH session with MFA required every time.
Steps to Reproduce
- Connect via Remote SSH to an MFA-protected host.
- Open a new window and connect to the same host → MFA/reconnect again.
- Reload window → MFA/reconnect again.
- Same steps in VS Code + Remote-SSH do not require MFA each time.
Expected Behavior
Connecting once to a host (with or without MFA) should be enough for normal use and new windows, same-host folders, and window reload should reuse that connection and not try to reconnect every time.
Operating System
Linux
Version Information
Version: 3.0.12
Commit: a80ff7dfcaa45d7750f6e30be457261379c29b00
Date: 2026-04-04T00:13:18.452Z
Layout: editor
Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Cursor/3.0.12 Chrome/142.0.7444.265 Electron/39.8.1 Safari/537.36
Additional Information
I found a similar bug report which wasn’t addressed and got auto-closed: Remote-SSH re-connecting on folder/workspace opening
Does this stop you from using Cursor
No - Cursor works, but with this issue
1 Like
This is a known limitation with how Cursor’s Remote SSH extension handles connections — each new window, folder change, or reload currently establishes a fresh SSH session rather than reusing the existing one. On hosts that require MFA, this means re-authenticating every time.
Our team is actively working on improving the SSH reconnection experience. I don’t have a specific timeline to share, but this is on their radar.
In the meantime, a potential workaround: if your SSH setup supports it, you can configure SSH ControlMaster multiplexing in your ~/.ssh/config to share a single SSH connection across multiple sessions to the same host. This can reduce or eliminate repeated MFA prompts:
Host your-remote-host
ControlMaster auto
ControlPath ~/.ssh/sockets/%r@%h-%p
ControlPersist 600
Make sure the ~/.ssh/sockets/ directory exists (mkdir -p ~/.ssh/sockets). This tells OpenSSH to reuse the first authenticated connection for subsequent ones to the same host, which should bypass repeated MFA prompts for up to 10 minutes (configurable via ControlPersist).
Note: this is an SSH client-level workaround, not a Cursor-specific setting. It may not work with all MFA setups (e.g., some PAM configurations), but it’s worth trying.
Thanks Mohit.
We had found & tested the multiplexing workaround earlier and it does work with our PAM module. But we’d prefer to avoid requiring all our developers to modify their SSH configs. It’s a bit of a hurdle for onboarding and standardisation.
We’ll be awaiting a native fix that handles this within Cursor itself.
1 Like