I enjoy using Cursor and perform a lot of my development via SSH on remote servers.
However, after I updated Cursor to Version 2.4.21, I could not access my servers anymore.
I got the following error:
Failed to connect to the remote extension host server (Error: WebSocket close with status code 1006)
To find out what was happening under the hood, I performed the following two checks to find the potential cause.
First, I tested my standard SSH connection in the terminal.
I found that I could access the servers via bare SSH without any issues.
This confirmed that the network connection and SSH configuration were working correctly.
Second, I attempted to use Cursor to connect to my backup servers.
These were machines I had never connected to with Cursor before.
Surprisingly, the connection worked perfectly.
This weird behavior helped me narrow down the potential cause of the connection error.
Since the updated Cursor client (Version 2.4.21) worked fine with “fresh” servers but failed with previous connections, it is likely the problem lay on the server side.
I suspected that the previous version of Cursor had some server-side processes running that were not compatible with the new version.
This mismatch or corruption led to the connection error.
To fix this, I applied the following steps:
Remove the existing Cursor server-side files:
rm -rf ~/.cursor-server