I know that this issue has been reported many times, but it is happening again now. Every 10 or so minutes Cursor loses connection to remote and tries to reconnect (without success). I have to refresh Cursor with Ctrl+Shift+P → Reload Window, which fixes the issue for the next 10min. Meanwhile, VScode has a stable connection with the same remote SSH extension.
I am using Linux Mint Xfce (Gnome interface) and apart from that, everything runs fast and smooth.
Hopefully this brings attention to this problem for the next update, thanks
Hi! We recently released a new Remote SSH extension that is bult and maintained by the Cursor team. The reconnection logic is reworked – and hopefully more stable.
If you’re currently using the VSCode Remote SSH extension (ms-vscode-remote.remote-ssh), could you uninstall that one, and instead install the anysphere.remote-ssh extension? You can find it by searching for @id:anysphere.remote-ssh in the extension search box (Attaching a screenshot). If it’s still not working, could you share the logs from the “Remote - SSH” output tab so we can take a look at what’s wrong? Thanks!
Thank you for the reply, just uninstalled Microsoft’s Remote SSH extension and am giving Anysphere Remote SSH a try (I only found it via the complete name @id:anysphere.remote-ssh though). The problem with the original Remote SSH got better from post date to today, but I am testing the suggested extension, and it seems very stable.
@finger1517 a week ago refreshing was the only solution I’ve found, thanks for the alternative. I am testing the extension @id:anysphere.remote-ssh and it is solving the problem for now, will report later if anything goes wrong.
Thank you for the attention Cursor team and fellow users, running remote SSH is a very important subject
hey, our server connect to the website using proxy,
@finger1517, could you share more about your proxy setup? Inside the settings, we support passing through proxy variables – curious if you tried setting these?
Next time it fails to connect, it’d be super helpful if you could share the logs from the “Remote - SSH” output window – these will contain more details why it failed to download.
Thank you for sharing the workaround – agree it’s quite unfortunate that you have to run this manually, but glad that it is unblocking you!
after setting the proxy, I tried to connect the server again, still not work, I can connect, but encountering the timeout error. When I set the http_proxy and run script manually, the server file can download successfully.
error log
| base64 --decode | bash --login
[Info - 08:43:56.896] Started installation script. Waiting for it to finish...
[Info - 08:43:56.896] Waiting for server to install via process(28209)...
[Trace - 08:43:56.900] (ssh_tunnel) stderr: OpenSSH_9.8p1, LibreSSL 3.3.6
[Trace - 08:43:56.900] (ssh_tunnel) stderr: debug1: Reading configuration data /Users/yangyuantao/.ssh/config
debug1: /Users/yangyuantao/.ssh/config line 14: Applying options for t2v_env_1
debug1: /Users/yangyuantao/.ssh/config line 83: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
[Trace - 08:43:56.900] (ssh_tunnel) stderr: debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
debug1: /etc/ssh/ssh_config line 54: Applying options for *
[Trace - 08:43:56.901] (ssh_tunnel) stderr: debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug1: Connecting to 172.20.70.223 [172.20.70.223] port 22.
[Trace - 08:43:56.950] (ssh_tunnel) stderr: debug1: Connection established.
[Trace - 08:43:56.951] (ssh_tunnel) stderr: debug1: identity file /Users/yangyuantao/.ssh/id_rsa type 0
debug1: identity file /Users/yangyuantao/.ssh/id_rsa-cert type -1
debug1: identity file /Users/yangyuantao/.ssh/id_ecdsa type -1
debug1: identity file /Users/yangyuantao/.ssh/id_ecdsa-cert type -1
[Trace - 08:43:56.951] (ssh_tunnel) stderr: debug1: identity file /Users/yangyuantao/.ssh/id_ecdsa_sk type -1
debug1: identity file /Users/yangyuantao/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /Users/yangyuantao/.ssh/id_ed25519 type -1
debug1: identity file /Users/yangyuantao/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/yangyuantao/.ssh/id_ed25519_sk type -1
debug1: identity file /Users/yangyuantao/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /Users/yangyuantao/.ssh/id_xmss type -1
debug1: identity file /Users/yangyuantao/.ssh/id_xmss-cert type -1
debug1: identity file /Users/yangyuantao/.ssh/id_dsa type -1
debug1: identity file /Users/yangyuantao/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.8
[Trace - 08:43:57.4] (ssh_tunnel) stderr: debug1: Remote protocol version 2.0, remote software version OpenSSH_9.6
debug1: compat_banner: match: OpenSSH_9.6 pat OpenSSH* compat 0x04000000
debug1: Authenticating to 172.20.70.223:22 as 'root'
[Trace - 08:43:57.5] (ssh_tunnel) stderr: debug1: load_hostkeys: fopen /Users/yangyuantao/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
[Trace - 08:43:57.60] (ssh_tunnel) stderr: debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ssh-ed25519
[Trace - 08:43:57.60] (ssh_tunnel) stderr: debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
[Trace - 08:43:57.60] (ssh_tunnel) stderr: debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
[Trace - 08:43:57.83] (ssh_tunnel) stderr: debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
[Trace - 08:43:57.145] (ssh_tunnel) stderr: debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:7SiOhg6ydobhDNmi+bm27p4QFQuWBrH4PbHNZVVeFqA
[Trace - 08:43:57.145] (ssh_tunnel) stderr: debug1: load_hostkeys: fopen /Users/yangyuantao/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host '172.20.70.223' is known and matches the ED25519 host key.
debug1: Found key in /Users/yangyuantao/.ssh/known_hosts:41
[Trace - 08:43:57.162] (ssh_tunnel) stderr: debug1: ssh_packet_send2_wrapped: resetting send seqnr 3
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: Sending SSH2_MSG_EXT_INFO
debug1: expecting SSH2_MSG_NEWKEYS
[Trace - 08:43:57.162] (ssh_tunnel) stderr: debug1: ssh_packet_read_poll2: resetting read seqnr 3
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
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>
debug1: kex_ext_info_check_ver: [email protected]=<0>
debug1: kex_ext_info_check_ver: [email protected]=<0>
[Trace - 08:43:57.303] (ssh_tunnel) stderr: debug1: SSH2_MSG_SERVICE_ACCEPT received
[Trace - 08:43:57.358] (ssh_tunnel) stderr: debug1: SSH2_MSG_EXT_INFO received
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>
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
[Trace - 08:43:57.363] (ssh_tunnel) stderr: debug1: get_agent_identities: bound agent to hostkey
[Trace - 08:43:57.364] (ssh_tunnel) stderr: debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities
[Trace - 08:43:57.364] (ssh_tunnel) stderr: debug1: Will attempt key: /Users/yangyuantao/.ssh/id_rsa RSA SHA256:p6yBTPafNzP0V/YnlKPVwcHicBBdmS8nvLK2wEV/M98
debug1: Will attempt key: /Users/yangyuantao/.ssh/id_ecdsa
debug1: Will attempt key: /Users/yangyuantao/.ssh/id_ecdsa_sk
debug1: Will attempt key: /Users/yangyuantao/.ssh/id_ed25519
debug1: Will attempt key: /Users/yangyuantao/.ssh/id_ed25519_sk
debug1: Will attempt key: /Users/yangyuantao/.ssh/id_xmss
debug1: Will attempt key: /Users/yangyuantao/.ssh/id_dsa
debug1: Offering public key: /Users/yangyuantao/.ssh/id_rsa RSA SHA256:p6yBTPafNzP0V/YnlKPVwcHicBBdmS8nvLK2wEV/M98
[Trace - 08:43:57.418] (ssh_tunnel) stderr: debug1: Server accepts key: /Users/yangyuantao/.ssh/id_rsa RSA SHA256:p6yBTPafNzP0V/YnlKPVwcHicBBdmS8nvLK2wEV/M98
[Trace - 08:43:57.492] (ssh_tunnel) stderr: Authenticated to 172.20.70.223 ([172.20.70.223]:22) using "publickey".
debug1: Local connections to LOCALHOST:58102 forwarded to remote address socks:0
[Trace - 08:43:57.492] (ssh_tunnel) stderr: debug1: Local forwarding listening on 127.0.0.1 port 58102.
debug1: channel 0: new port-listener [port listener] (inactive timeout: 0)
debug1: Local forwarding listening on ::1 port 58102.
debug1: channel 1: new port-listener [port listener] (inactive timeout: 0)
debug1: channel 2: new session [client-session] (inactive timeout: 0)
debug1: Requesting [email protected]
[Trace - 08:43:57.492] (ssh_tunnel) stderr: debug1: Entering interactive session.
debug1: pledge: filesystem
[Trace - 08:43:57.541] (ssh_tunnel) stderr: debug1: client_input_global_request: rtype [email protected] want_reply 0
debug1: client_input_hostkeys: searching /Users/yangyuantao/.ssh/known_hosts for 172.20.70.223 / (none)
[Trace - 08:43:57.545] (ssh_tunnel) stderr: debug1: client_input_hostkeys: searching /Users/yangyuantao/.ssh/known_hosts2 for 172.20.70.223 / (none)
[Trace - 08:43:57.546] (ssh_tunnel) stderr: debug1: client_input_hostkeys: hostkeys file /Users/yangyuantao/.ssh/known_hosts2 does not exist
debug1: client_input_hostkeys: no new or deprecated keys from server
debug1: Remote: /root/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Remote: /root/.ssh/authorized_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
[Trace - 08:43:57.590] (ssh_tunnel) stderr: debug1: Sending environment.
debug1: Sending command: echo "CmV4cG9ydCBIVFRQX1BST1hZPSJodHRwOi8vaHR0cHByb3h5LmdsbS5haTo4ODg4IgpleHBvcnQgaHR0cF9wcm94eT0iaHR0cDovL2h0dHBwcm94eS5nbG0uYWk6ODg4OCIKZXhwb3J0IEhUVFBTX1BST1hZPSJodHRwOi8vaHR0cHByb3h5LmdsbS5haTo4ODg4IgpleHBvcnQgaHR0cHNfcHJveHk9Imh0dHA6Ly9odHRwcHJveHkuZ2xtLmFpOjg4ODgiCgpUTVBfRElSPSIke1hER19SVU5USU1FX0RJUjotIi90bXAifSIKClNFUlZFUl9DT01NSVQ9IjA3ODFlODExZGUzODZhMGM1YmNiMDdjZWIyNTlkZjhmZjgyNDZhNTAiClNFUlZFUl9MSU5FPSJwcm9kdWN0aW9uIgpTRVJWRVJfREFUQV9ESVI9IiRIT01FLy5jdXJzb3Itc2VydmVyIgpTRVJWRVJfRElSPSIkU0VSVkVSX0RBVEFfRElSL2Jpbi8wNzgxZTgxMWRlMzg2YTBjNWJjYjA3Y2ViMjU5ZGY4ZmY4MjQ2YTUwIgpTRVJWRVJfTk9ERV9FWEVDVVRBQkxFPSIkU0VSVkVSX0RJUi9ub2RlIgoKCkNPREVfU0VSVkVSX1NDUklQVD0iJFNFUlZFUl9ESVIvYmluL2N1cnNvci1zZXJ2ZXIiCkNPREVfU0VSVkVSX0xPR0ZJTEU9IiRTRVJWRVJfREFUQV9ESVIvLiRTRVJWRVJfQ09NTUlULmNvZGUubG9nIgpDT0RFX1NFUlZFUl9UT0tFTkZJTEU9IiRTRVJWRVJfREFUQV9ESVIvLiRTRVJWRVJfQ09NTUlULmNvZGUudG9rZW4iCkNPREVfU0VSVk
[Trace - 08:43:57.590] (ssh_tunnel) stderr: debug1: pledge: network
[Trace - 08:43:57.715] (ssh_tunnel) stdout: Killing all running Cursor servers
[Trace - 08:43:57.724] (ssh_tunnel) stdout: No running code servers found
Killing running code servers:
Killing all running multiplex servers
[Trace - 08:43:57.735] (ssh_tunnel) stdout: No running multiplex servers found
Killing running multiplex servers:
[Trace - 08:43:57.736] (ssh_tunnel) stdout: Removing all existing Cursor installations
[Trace - 08:43:57.755] (ssh_tunnel) stdout: removed '/root/.cursor-server/bin/0781e811de386a0c5bcb07ceb259df8ff8246a50/cursor-server-88127414-5706-49c7-9a96-b50dda3b1a68.tar.gz'
removed directory '/root/.cursor-server/bin/0781e811de386a0c5bcb07ceb259df8ff8246a50'
removed directory '/root/.cursor-server/bin'
[Trace - 08:43:57.784] (ssh_tunnel) stdout: Locking /tmp/cursor-remote-lock.02f8004e40c905d5d56514de1f758ee5407c992587af6d2e6f984a24ef7da549
[Trace - 08:43:57.788] (ssh_tunnel) stdout: Downloading server via wget: wget --tries=3 --timeout=10 --continue --no-verbose -O cursor-server-c7601ad3-375b-485e-96f7-5eb0666b0fdb.tar.gz https://cursor.blob.core.windows.net/remote-releases/0781e811de386a0c5bcb07ceb259df8ff8246a50/vscode-reh-linux-x64.tar.gz
[Error - 08:46:56.901] Error resolving SSH authority
Error: Failed to install server within the timeout
at Timeout._onTimeout (/Users/yangyuantao/.cursor/extensions/anysphere.remote-ssh-0.0.30/dist/main.js:1:217857)
at listOnTimeout (node:internal/timers:581:17)
at process.processTimers (node:internal/timers:519:7)
[Trace - 08:47:57.496] (ssh_tunnel) stderr: 2025-05-13 16:47:57 URL:https://cursor.blob.core.windows.net/remote-releases/0781e811de386a0c5bcb07ceb259df8ff8246a50/vscode-reh-linux-x64.tar.gz [62228437/62228437] -> "cursor-server-c7601ad3-375b-485e-96f7-5eb0666b0fdb.tar.gz" [2]
[Trace - 08:47:58.976] (ssh_tunnel) stdout: Checking if node executable works
[Trace - 08:47:58.981] (ssh_tunnel) stdout: v20.18.2
[Trace - 08:47:58.987] (ssh_tunnel) stdout: Checking for running multiplex server: /root/.cursor-server/bin/multiplex-server/c9cd616174c0373d979b931a82177611d9368e1ff0c93367d6c5e1dc4e7ba058.js
[Trace - 08:47:58.994] (ssh_tunnel) stdout: Running multiplex server:
[Trace - 08:47:59.3] (ssh_tunnel) stdout: Creating directory for multiplex server: /root/.cursor-server/bin/multiplex-server
Writing multiplex server script to /root/.cursor-server/bin/multiplex-server/c9cd616174c0373d979b931a82177611d9368e1ff0c93367d6c5e1dc4e7ba058.js
[Trace - 08:47:59.5] (ssh_tunnel) stdout: Starting multiplex server: /root/.cursor-server/bin/0781e811de386a0c5bcb07ceb259df8ff8246a50/node /root/.cursor-server/bin/multiplex-server/c9cd616174c0373d979b931a82177611d9368e1ff0c93367d6c5e1dc4e7ba058.js 7252b2d4-0275-433f-a209-e8bde75feef4
Reading multiplex server token file /root/.cursor-server/.0781e811de386a0c5bcb07ceb259df8ff8246a50.multiplex.token
Multiplex server token file found
Reading multiplex server log file /root/.cursor-server/.0781e811de386a0c5bcb07ceb259df8ff8246a50.multiplex.log
[Trace - 08:47:59.511] (ssh_tunnel) stdout: Checking for code servers
[Trace - 08:47:59.521] (ssh_tunnel) stdout: Code server script is not running
[Trace - 08:47:59.529] (ssh_tunnel) stdout: Starting code server script /root/.cursor-server/bin/0781e811de386a0c5bcb07ceb259df8ff8246a50/bin/cursor-server --start-server --host=127.0.0.1 --port 0 --connection-token-file /root/.cursor-server/.0781e811de386a0c5bcb07ceb259df8ff8246a50.code.token --telemetry-level off --enable-remote-auto-shutdown --accept-server-license-terms &> /root/.cursor-server/.0781e811de386a0c5bcb07ceb259df8ff8246a50.code.log &
[Trace - 08:48:00.35] (ssh_tunnel) stdout: e754c578a4e8e5a40031f71d: start
exitCode==0==
nodeExecutable==/root/.cursor-server/bin/0781e811de386a0c5bcb07ceb259df8ff8246a50/node==
errorMessage====
multiplexListeningOn==33193==
multiplexConnectionToken==7252b2d4-0275-433f-a209-e8bde75feef4==
codeListeningOn==45047==
codeConnectionToken==4ca770eb-2600-4654-987d-6c7899179c26==
SSH_AUTH_SOCK====
HTTP_PROXY==http://myproxy.ai.ai:8888==
http_proxy==http://myproxy.ai.ai:8888==
HTTPS_PROXY==http://myproxy.ai.ai:8888==
https_proxy==http://myproxy.ai.ai:8888==
e754c578a4e8e5a40031f71d: end
[Trace - 08:48:00.51] (ssh_tunnel) stdout: Unlocking /tmp/cursor-remote-lock.02f8004e40c905d5d56514de1f758ee5407c992587af6d2e6f984a24ef7da549
[Trace - 08:53:00.537] (ssh_tunnel) stderr: debug1: client_input_channel_req: channel 2 rtype exit-status reply 0
debug1: client_input_channel_req: channel 2 rtype [email protected] reply 0
debug1: channel 2: free: client-session, nchannels 3
[Trace - 08:53:00.538] (ssh_tunnel) stderr: debug1: channel 0: free: port listener, nchannels 2
debug1: channel 1: free: port listener, nchannels 1
Transferred: sent 33960, received 7780 bytes, in 543.0 seconds
Bytes per second: sent 62.5, received 14.3
debug1: Exit status 0
[Trace - 08:53:00.539] (ssh_tunnel): exit
{"code":0,"_signal":null}
I am experiencing remote SSH instability again, every 5min or so. I have uninstalled ms-remote-ssh and installed the anysphere equivalent. My setup is:
Running one window of a project in a login node, let’s call it “login3”
Running another window with another project in login3 as well;
The second window is on my second linux workspace. It must be refreshed every 5min or so
The first window seems stable, no need to refresh constantly
What is the best way to generate logs to report this problem?
Hi @vkr, thanks for sharing. Would you be able to share the logs for the “Remote - SSH” output for both windows? Attaching a screenshot where to find these logs. Thanks!
Hi @vkr, thanks for sharing the logs. I see log lines indicating that multiplexing is enabled. This setting would cause the underlying SSH connection to be reused between windows (as opposed to each window having its own).
Could you try turning this setting off and see if this helps? (In your ~/.ssh/config file, comment out the ControlPath, ControlMaster, and ControlPersist for the host.)
If this doesn’t help, then next time it happens, could share the logs from the original window (where it works) and the second window (where it keeps on reconnecting)? Thanks!