SSH remote development broken on update

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Anysphere Remote‑SSH breaks the ssh connection when attempting to install cursor-server.

debug1: Remote: /home/joshuaw/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Sending environment.
debug1: Sending command: bash --login -c bash
debug1: pledge: network

2025-10-07 17:02:37.530 [info] (ssh_tunnel) stderr: Read from remote host XXX.XXX.XXX.XXX: Connection reset by peer

2025-10-07 17:02:37.530 [info] (ssh_tunnel) stderr: client_loop: send disconnect: Broken pipe

2025-10-07 17:02:37.537 [error] Error installing server: Failed to connect to the remote SSH host. Please check the logs for more details.
2025-10-07 17:02:37.537 [info] Deleting local script /var/folders/nk/ptqp3c4s4ts5t6knr4fmy5xh0000gp/T/cursor_remote_install_93e31f79-d4e8-42b2-bd72-85785d52a62d.sh
2025-10-07 17:02:37.537 [error] Error resolving SSH authority Failed to connect to the remote SSH host. Please check the logs for more details.

This behavior doesn’t occur when using vscode to remotely connect. I have triple checked ssh config on the remote server, TCP port forwarding is allowed.

When manually executing my own bootstrap comment it seems to work fine:

{ echo ‘echo OK_FROM_SCRIPT’; echo ‘sleep 1’; } | \
ssh -T XXX.XXX.XXX.XXX bash --login -c bash
OK_FROM_SCRIPT

Which makes me think there’s something wrong with the any sphere ssh extension

Steps to Reproduce

Just simply try to connect to a remote host

Expected Behavior

It is meant to simply install the server and connect to it

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.7.38
VSCode Version: 1.99.3
Commit: fe5d1728063e86edeeda5bebd2c8e14bf4d0f960

Does this stop you from using Cursor

Yes - Cursor is unusable

2 Likes

+1 here. Impossible to use Cursor with SSH…

1 Like

This error indicates that the network dropped, or the remote server closed the connection unexpectedly.

Which version of the Anysphere remote ssh extension are you on?

Could you share the “Remote - SSH” logs when you connect via VSCode? Wondering if the connection parameters are slightly different, which is causing the failed connection.

This is a problem for me too. I am trying to switch to a new work laptop and my old one had the ms-vscode-remote extension which worked perfectly fine. Now my new laptop’s install is telling me that it is trying to copy the cursor server rather than the vscode server and its just getting stuck and nothing is happening. I can ssh fine from the command line or putty, and I need ssh access to work. Please update this if there are any solutions that could help me get my new laptop working.

SSH broken here to, every time i update it’s a plague, jeez

I’ve actually found the source of the bug, it was an overly restrictive traffic filter on the network.

However the reason that vscode doesn’t fail but cursor does in this case is that on line 429 of the cursor remote server install script a really large line is piped over ssh that makes the connection drop

I am using ms-vscode-remote and experiencing this issue. After I am connected, I am unable to use the Search feature then if I unfocus the window it loses my SSH connection.

Remote-SSH version: 0.113.1 - Last update 2025-01-14

Cursor Version Info

Version: 1.7.38
VSCode Version: 1.99.3
Commit: fe5d1728063e86edeeda5bebd2c8e14bf4d0f960
Date: 2025-10-06T18:18:58.523Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.6.0

Remote - SSH output:

[08:04:36.453] SSH Resolver called for "ssh-remote+hoth", attempt 2, (Reconnection)
[08:04:36.455] SSH Resolver called for host: hoth
[08:04:36.455] Setting up SSH remote "hoth"
[08:04:36.456] Acquiring local install lock: /var/folders/yr/tg_h4yyj19sbr18hy1llbr8w0000gn/T/vscode-remote-ssh-ca010cf4-install.lock
[08:04:36.457] Looking for existing server data file at /Users/cameron/Library/Application Support/Cursor/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-ca010cf4-fe5d1728063e86edeeda5bebd2c8e14bf4d0f960-0.113.1-es/data.json
[08:04:36.457] Found local server running: {"remoteListeningOn":{"port":34377},"osReleaseId":"ubuntu","arch":"x86_64","sshAuthSock":"/tmp/ssh-zExsFINLoi/agent.3679824","display":"","tmpDir":"/run/user/1000","platform":"linux","execServerToken":"be9188ab-d2e8-4e87-a020-de2139712f63","pid":18458,"ipcHandlePath":"/var/folders/yr/tg_h4yyj19sbr18hy1llbr8w0000gn/T/vscode-ssh-askpass-e6cbbe4abe09523f6dc292419b84f2c0c9977319.sock","socksPort":61755,"startupTime":1759924673937}
[08:04:36.457] Running server is stale. Ignoring
[08:04:36.458] Using commit id "fe5d1728063e86edeeda5bebd2c8e14bf4d0f960" and quality "stable" for server
[08:04:36.462] Install and start server if needed
[08:04:36.464] PATH: /Users/cameron/.opencode/bin:/Users/cameron/.bun/bin:/Users/cameron/bin:/Users/cameron/.local/bin:/usr/local/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Applications/iTerm.app/Contents/Resources/utilities
[08:04:36.464] Checking ssh with "ssh -V"
[08:04:36.477] > OpenSSH_9.9p2, LibreSSL 3.3.6

[08:04:36.479] askpass server listening on /var/folders/yr/tg_h4yyj19sbr18hy1llbr8w0000gn/T/vscode-ssh-askpass-874a7311e5a62d6634a2a2583b659ee51b125ddd.sock
[08:04:36.479] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/yr/tg_h4yyj19sbr18hy1llbr8w0000gn/T/vscode-ssh-askpass-2f196d8bf5330727705283c789d01dc150ecc1c5.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","62145","-o","ConnectTimeout=15","hoth"],"serverDataFolderName":".cursor-server","dataFilePath":"/Users/cameron/Library/Application Support/Cursor/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-ca010cf4-fe5d1728063e86edeeda5bebd2c8e14bf4d0f960-0.113.1-es/data.json"}
[08:04:36.479] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.S0119yAEHY/Listeners","SHELL":"/bin/zsh","DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/cameron/.cursor/extensions/ms-vscode-remote.remote-ssh-0.113.1/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Cursor.app/Contents/Frameworks/Cursor Helper (Plugin).app/Contents/MacOS/Cursor Helper (Plugin)","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"","VSCODE_SSH_ASKPASS_MAIN":"/Users/cameron/.cursor/extensions/ms-vscode-remote.remote-ssh-0.113.1/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/yr/tg_h4yyj19sbr18hy1llbr8w0000gn/T/vscode-ssh-askpass-874a7311e5a62d6634a2a2583b659ee51b125ddd.sock"}
[08:04:36.481] Spawned 24044
[08:04:36.574] > local-server-1> Running ssh connection command: ssh -v -T -D 62145 -o ConnectTimeout=15 hoth
[08:04:36.576] > local-server-1> Spawned ssh, pid=24054
[08:04:36.580] stderr> OpenSSH_9.9p2, LibreSSL 3.3.6
[08:04:36.580] stderr> debug1: Reading configuration data /Users/cameron/.ssh/config
[08:04:36.581] stderr> debug1: /Users/cameron/.ssh/config line 1: Applying options for hoth
[08:04:36.581] stderr> debug1: /Users/cameron/.ssh/config line 6: Applying options for *
[08:04:36.581] stderr> debug1: Reading configuration data /etc/ssh/ssh_config
[08:04:36.581] stderr> debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
[08:04:36.581] stderr> debug1: /etc/ssh/ssh_config line 54: Applying options for *
[08:04:36.581] stderr> debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
[08:04:36.581] stderr> debug1: Connecting to hoth [hoth] port 22.
[08:04:36.581] stderr> debug1: fd 3 clearing O_NONBLOCK
[08:04:36.581] stderr> debug1: Connection established.
[08:04:36.582] stderr> debug1: identity file /Users/cameron/.ssh/id_rsa type 0
[08:04:36.582] stderr> debug1: identity file /Users/cameron/.ssh/id_rsa-cert type -1
[08:04:36.582] stderr> debug1: identity file /Users/cameron/.ssh/id_ecdsa type -1
[08:04:36.582] stderr> debug1: identity file /Users/cameron/.ssh/id_ecdsa-cert type -1
[08:04:36.582] stderr> debug1: identity file /Users/cameron/.ssh/id_ecdsa_sk type -1
[08:04:36.582] stderr> debug1: identity file /Users/cameron/.ssh/id_ecdsa_sk-cert type -1
[08:04:36.582] stderr> debug1: identity file /Users/cameron/.ssh/id_ed25519 type 3
[08:04:36.582] stderr> debug1: identity file /Users/cameron/.ssh/id_ed25519-cert type -1
[08:04:36.583] stderr> debug1: identity file /Users/cameron/.ssh/id_ed25519_sk type -1
[08:04:36.583] stderr> debug1: identity file /Users/cameron/.ssh/id_ed25519_sk-cert type -1
[08:04:36.583] stderr> debug1: identity file /Users/cameron/.ssh/id_xmss type -1
[08:04:36.583] stderr> debug1: identity file /Users/cameron/.ssh/id_xmss-cert type -1
[08:04:36.583] stderr> debug1: identity file /Users/cameron/.ssh/id_dsa type -1
[08:04:36.583] stderr> debug1: identity file /Users/cameron/.ssh/id_dsa-cert type -1
[08:04:36.583] stderr> debug1: Local version string SSH-2.0-OpenSSH_9.9
[08:04:36.587] stderr> debug1: Remote protocol version 2.0, remote software version OpenSSH_9.6p1 Ubuntu-3ubuntu13.14
[08:04:36.587] stderr> debug1: compat_banner: match: OpenSSH_9.6p1 Ubuntu-3ubuntu13.14 pat OpenSSH* compat 0x04000000
[08:04:36.587] stderr> debug1: Authenticating to hoth:22 as 'cameron'
[08:04:36.587] stderr> debug1: load_hostkeys: fopen /Users/cameron/.ssh/known_hosts2: No such file or directory
[08:04:36.588] stderr> debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
[08:04:36.588] stderr> debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
[08:04:36.588] stderr> debug1: SSH2_MSG_KEXINIT sent
[08:04:36.588] stderr> debug1: SSH2_MSG_KEXINIT received
[08:04:36.588] stderr> debug1: kex: algorithm: [email protected]
[08:04:36.588] stderr> debug1: kex: host key algorithm: ssh-ed25519
[08:04:36.588] stderr> debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
[08:04:36.588] stderr> debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
[08:04:36.597] stderr> debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
[08:04:36.607] stderr> debug1: SSH2_MSG_KEX_ECDH_REPLY received
[08:04:36.607] stderr> debug1: Server host key: ssh-ed25519 SHA256:Stn+9LS7UXJEMZiL12k8fPti3poed14YzlKnl7wLqiw
[08:04:36.607] stderr> debug1: load_hostkeys: fopen /Users/cameron/.ssh/known_hosts2: No such file or directory
[08:04:36.607] stderr> debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
[08:04:36.607] stderr> debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
[08:04:36.607] stderr> debug1: Host 'hoth' is known and matches the ED25519 host key.
[08:04:36.607] stderr> debug1: Found key in /Users/cameron/.ssh/known_hosts:18
[08:04:36.611] stderr> debug1: ssh_packet_send2_wrapped: resetting send seqnr 3
[08:04:36.611] stderr> debug1: rekey out after 134217728 blocks
[08:04:36.611] stderr> debug1: SSH2_MSG_NEWKEYS sent
[08:04:36.611] stderr> debug1: Sending SSH2_MSG_EXT_INFO
[08:04:36.611] stderr> debug1: expecting SSH2_MSG_NEWKEYS
[08:04:36.611] stderr> debug1: ssh_packet_read_poll2: resetting read seqnr 3
[08:04:36.611] stderr> debug1: SSH2_MSG_NEWKEYS received
[08:04:36.611] stderr> debug1: rekey in after 134217728 blocks
[08:04:36.611] stderr> debug1: SSH2_MSG_EXT_INFO received
[08:04:36.611] stderr> debug1: kex_ext_info_client_parse: server-sig-algs=<ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256>
[08:04:36.611] stderr> debug1: kex_ext_info_check_ver: [email protected]=<0>
[08:04:36.611] stderr> debug1: kex_ext_info_check_ver: [email protected]=<0>
[08:04:36.652] stderr> debug1: SSH2_MSG_SERVICE_ACCEPT received
[08:04:36.653] stderr> debug1: SSH2_MSG_EXT_INFO received
[08:04:36.653] stderr> debug1: kex_ext_info_client_parse: server-sig-algs=<ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],rsa-sha2-512,rsa-sha2-256>
[08:04:36.653] stderr> debug1: Authentications that can continue: publickey,password
[08:04:36.654] stderr> debug1: Next authentication method: publickey
[08:04:36.740] stderr> debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities
[08:04:36.740] stderr> debug1: Will attempt key: /Users/cameron/.ssh/id_rsa RSA SHA256:QcDhf4bP771mtGg2AC6hkbTb1guougmN2N1hDzXHAF4
[08:04:36.740] stderr> debug1: Will attempt key: /Users/cameron/.ssh/id_ecdsa 
[08:04:36.740] stderr> debug1: Will attempt key: /Users/cameron/.ssh/id_ecdsa_sk 
[08:04:36.740] stderr> debug1: Will attempt key: /Users/cameron/.ssh/id_ed25519 ED25519 SHA256:Bg6zUE+zhFuBwyP8J7OL4m/abqUQSPyJNsLcsg+sLds
[08:04:36.740] stderr> debug1: Will attempt key: /Users/cameron/.ssh/id_ed25519_sk 
[08:04:36.740] stderr> debug1: Will attempt key: /Users/cameron/.ssh/id_xmss 
[08:04:36.741] stderr> debug1: Will attempt key: /Users/cameron/.ssh/id_dsa 
[08:04:36.741] stderr> debug1: Offering public key: /Users/cameron/.ssh/id_rsa RSA SHA256:QcDhf4bP771mtGg2AC6hkbTb1guougmN2N1hDzXHAF4
[08:04:36.746] stderr> debug1: Authentications that can continue: publickey,password
[08:04:36.746] stderr> debug1: Trying private key: /Users/cameron/.ssh/id_ecdsa
[08:04:36.746] stderr> debug1: Trying private key: /Users/cameron/.ssh/id_ecdsa_sk
[08:04:36.746] stderr> debug1: Offering public key: /Users/cameron/.ssh/id_ed25519 ED25519 SHA256:Bg6zUE+zhFuBwyP8J7OL4m/abqUQSPyJNsLcsg+sLds
[08:04:36.753] stderr> debug1: Authentications that can continue: publickey,password
[08:04:36.753] stderr> debug1: Trying private key: /Users/cameron/.ssh/id_ed25519_sk
[08:04:36.753] stderr> debug1: Trying private key: /Users/cameron/.ssh/id_xmss
[08:04:36.753] stderr> debug1: Trying private key: /Users/cameron/.ssh/id_dsa
[08:04:36.753] stderr> debug1: Next authentication method: password
[08:04:36.753] stderr> debug1: read_passphrase: can't open /dev/tty: Device not configured
[08:04:36.860] Got askpass request: {"request":" cameron@hoth's password:"}
[08:04:36.861] Showing password prompt
[08:04:36.862] Listening for interwindow password on /var/folders/yr/tg_h4yyj19sbr18hy1llbr8w0000gn/T/vscode-ssh-askpass-7d6e221bcb478c5ec9b3c0db34d08f532642181d.sock
[08:04:36.862] Writing password prompt to globalState
[08:04:40.790] Exec server for ssh-remote+hoth closed (gracefully)

Ok so I might have found the solution, at least for my work. Not sure if it will solve it for everyone. The issue on my end was that the server I was trying to ssh into did not have IPv6 and so when Cursor tried to download the server it would fail, and fall back to the ssh download like the previous comment described. To fix this, I went to my home directory using PUTTY and performed:

echo ‘inet4_only = on’ >> ~/.wgetrc

Then reloaded the ssh session on Cursor. This seemed to solve the download issue and allowed me to start working on the server. I tried this on multiple servers and it worked each time. Hope this helps!

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.