Hey everybody! Im trying to connect cursor to replit so I can modify the frontend via cursor and auto updates my code in replit also.
However, I cant seem to get it to work. I’ve already tried deleting the ssh and doing the entire thing all over again but it still always gives me the same error.
Well I just got it to work on my Windows 11 Laptop. I was working on this for hours yesterday without result. I just went to try launching the SSH connection to revisit what the error message was going to be but it actually worked this time and connected.
Now I’m trying to remember what was the last thing I changed yesterday but I can’t remember exactly. What I was playing with is the config file and the SSH public and private key create on Windows 11. I think I created the SSH keys in power shell not command prompt but switched back to command prompt as power shell was adding to the command when copy pasting commands. Wish I could tell you what exactly it was but it is around this SSH key creation and or the config file.
This is what my config file looks like;
Host *.replit.dev
Port 22
IdentityFile C:/Users/username/.ssh/replit
Change the above username to what your windows username is.
Used this link to learn how to create the SSH Keys;
I’m on Mac. Using the port 22 etc. in my config file, too. Just like Matt showed in his vid. Let’s hope this is getting fixed next week. Would appreciate if replit or cursor’s team looked into this
anyone else still having this issue? I’m on mac, cannot establish a connection. Gets stuck either asking for a password or in ‘trying public key’. I’ve spent like 6 hours trouble shooting this. Tried ever route in all these community threads, followed the docs, followed every youtube video. Zero luck. No issue connecting to VS code or windsurfer but fully blocked trying to connect with cursor.
Update:
After 10+ hours of trouble shooting, I found a route that worked. The Open Remote SSH extension in cursor wasn’t working for this, and I saw some people were able to use the microsoft remote ssh extension found in the vs code marketplace. The most recent version doesn’t directly work either (says it only works on microsoft versions of vs code) but I tried with downloading a much earlier version and dropping the .vsix file directly into cursor extensions. Works!
I ran into this same problem on Mac, trying to ssh into Replit with Cursor, and fixed it in a similar way. Some notes here in case it helps anybody in the future:
The shell command provided by replit to “connect manually” worked fine in iTerm2/Terminal, so I knew it wasn’t a connectivity/firewall issue.
In VSCode, I could see & install an extension called “Remote - SSH”, maintained by Microsoft.
With that official Remote - SSH extension in VSCode, the “Launch VS Code” link on replit worked great in VSCode.
In Cursor, that “Remote - SSH” extension wasn’t available. Instead there’s an extension called “Open Remote - SSH”, which isn’t maintained by Microsoft.
I couldn’t get Cursor to connect via SSH with “Open Remote - SSH”. Debugging a little, it looks like the replit SSH server doesn’t send a ‘close’ message after executing a command. “Open Remote - SSH” expects to see a ‘close’, so it waits around forever, showing “Setting up SSH Host” in its little window when it tries to execute ‘uname -s’ remotely. (FWIW I don’t know if this is a replit problem or an extension problem)
There’s a way to manually “install any VSCode extension in Cursor”
But none of the versions of “Secure - SSH” in the VSCode marketplace (see: Version History) worked with the version of VSCode version that my Cursor version is using under the hood
So now, with the manually-installed and slightly-outdated Secure - SSH extension, I can click the “Launch Cursor” button in replit and fully enjoy SSH access from within Cursor. I hope this helps someone!