SSH Connection to Replit

Hey everybody!
im trying to connect Cursor with Replit but the connection wont work. I created an ssh key and put it into the Replit SSH Config. After that i got the shell command in replit:

ssh -i %HOMEPATH%/.ssh/replit -p 22 30b5eb4a-ea4c-401f-9eed-8f551ffc6866@30b5eb4a-ea4c-401f-9eed-8f551ffc6866-00-1yd46okkcugaa.worf.replit.dev

Now i put that into the SSH Host creation in Cursor. After that when i want to connect. i get the following problem:

Can anybody tell me what to do so the connection works? This right here is the error code. Really appreciate the help btw :slight_smile:

[17:36:01.684] Log Level: 2

[17:36:01.693] SSH Resolver called for "ssh-remote+30b5eb4a-ea4c-401f-9eed-8f551ffc6866-00-1yd46okkcugaa.worf.replit.dev", attempt 1

[17:36:01.693] "remote.SSH.useLocalServer": false

[17:36:01.693] "remote.SSH.useExecServer": true

[17:36:01.694] "remote.SSH.showLoginTerminal": false

[17:36:01.694] "remote.SSH.remotePlatform": {}

[17:36:01.694] "remote.SSH.path": undefined

[17:36:01.694] "remote.SSH.configFile": undefined

[17:36:01.694] "remote.SSH.useFlock": true

[17:36:01.694] "remote.SSH.lockfilesInTmp": false

[17:36:01.694] "remote.SSH.localServerDownload": auto

[17:36:01.694] "remote.SSH.remoteServerListenOnSocket": false

[17:36:01.694] "remote.SSH.showLoginTerminal": false

[17:36:01.694] "remote.SSH.defaultExtensions": []

[17:36:01.694] "remote.SSH.loglevel": 2

[17:36:01.695] "remote.SSH.enableDynamicForwarding": true

[17:36:01.695] "remote.SSH.enableRemoteCommand": false

[17:36:01.695] "remote.SSH.serverPickPortsFromRange": {}

[17:36:01.695] "remote.SSH.serverInstallPath": {}

[17:36:01.702] VS Code version: 0.39.6

[17:36:01.702] Remote-SSH version: remote-ssh@0.112.0

[17:36:01.702] win32 x64

[17:36:01.707] SSH Resolver called for host: 30b5eb4a-ea4c-401f-9eed-8f551ffc6866-00-1yd46okkcugaa.worf.replit.dev

[17:36:01.707] Setting up SSH remote "30b5eb4a-ea4c-401f-9eed-8f551ffc6866-00-1yd46okkcugaa.worf.replit.dev"

[17:36:01.711] Using commit id "a4f99b7dfb14460cb0bcebd9f6ac7ca158217920" and quality "stable" for server

[17:36:01.713] Install and start server if needed

[17:36:03.087] Checking ssh with "c:\Users\49171\AppData\Local\Programs\cursor\resources\app\bin\ssh.exe -V"

[17:36:03.089] Got error from ssh: spawn c:\Users\49171\AppData\Local\Programs\cursor\resources\app\bin\ssh.exe ENOENT

[17:36:03.090] Checking ssh with "C:\Program Files (x86)\Razer Chroma SDK\bin\ssh.exe -V"

[17:36:03.091] Got error from ssh: spawn C:\Program Files (x86)\Razer Chroma SDK\bin\ssh.exe ENOENT

[17:36:03.091] Checking ssh with "C:\Program Files\Razer Chroma SDK\bin\ssh.exe -V"

[17:36:03.092] Got error from ssh: spawn C:\Program Files\Razer Chroma SDK\bin\ssh.exe ENOENT

[17:36:03.092] Checking ssh with "C:\Program Files (x86)\Razer\ChromaBroadcast\bin\ssh.exe -V"

[17:36:03.093] Got error from ssh: spawn C:\Program Files (x86)\Razer\ChromaBroadcast\bin\ssh.exe ENOENT

[17:36:03.093] Checking ssh with "C:\Program Files\Razer\ChromaBroadcast\bin\ssh.exe -V"

[17:36:03.094] Got error from ssh: spawn C:\Program Files\Razer\ChromaBroadcast\bin\ssh.exe ENOENT

[17:36:03.094] Checking ssh with "C:\Windows\system32\ssh.exe -V"

[17:36:03.095] Got error from ssh: spawn C:\Windows\system32\ssh.exe ENOENT

[17:36:03.095] Checking ssh with "C:\Windows\ssh.exe -V"

[17:36:03.096] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT

[17:36:03.096] Checking ssh with "C:\Windows\System32\Wbem\ssh.exe -V"

[17:36:03.097] Got error from ssh: spawn C:\Windows\System32\Wbem\ssh.exe ENOENT

[17:36:03.097] Checking ssh with "C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V"

[17:36:03.098] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT

[17:36:03.098] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V"

[17:36:03.132] > OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2

[17:36:03.136] Remote command length: 4932/8192 characters

[17:36:03.136] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 65384 "30b5eb4a-ea4c-401f-9eed-8f551ffc6866-00-1yd46okkcugaa.worf.replit.dev" powershell

[17:36:03.138] Terminal shell path: C:\Windows\System32\cmd.exe

[17:36:03.581] > e]0;C:\Windows\System32\cmd.exea

[17:36:03.581] Got some output, clearing connection timeout

[17:36:03.760] > percent_expand: unknown key %H

[17:36:03.782] > Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.

[17:36:05.038] "install" terminal command done

[17:36:05.038] Install terminal quit with output: Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.

[17:36:05.038] Received install output: Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben.

[17:36:05.039] Failed to parse remote port from server output

[17:36:05.040] Resolver error: Error:

at g.Create (c:\Users\49171\.cursor\extensions\ms-vscode-remote.remote-ssh-0.112.0\out\extension.js:2:499918)

at t.handleInstallOutput (c:\Users\49171\.cursor\extensions\ms-vscode-remote.remote-ssh-0.112.0\out\extension.js:2:497240)

at t.tryInstall (c:\Users\49171\.cursor\extensions\ms-vscode-remote.remote-ssh-0.112.0\out\extension.js:2:621123)

at async c:\Users\49171\.cursor\extensions\ms-vscode-remote.remote-ssh-0.112.0\out\extension.js:2:580768

at async t.withShowDetailsEvent (c:\Users\49171\.cursor\extensions\ms-vscode-remote.remote-ssh-0.112.0\out\extension.js:2:584074)

at async k (c:\Users\49171\.cursor\extensions\ms-vscode-remote.remote-ssh-0.112.0\out\extension.js:2:577687)

at async t.resolve (c:\Users\49171\.cursor\extensions\ms-vscode-remote.remote-ssh-0.112.0\out\extension.js:2:581445)

at async c:\Users\49171\.cursor\extensions\ms-vscode-remote.remote-ssh-0.112.0\out\extension.js:2:848061

[17:36:05.044] ------

[17:36:06.093] Opening exec server for ssh-remote+30b5eb4a-ea4c-401f-9eed-8f551ffc6866-00-1yd46okkcugaa.worf.replit.dev

[17:36:06.139] Initizing new exec server for ssh-remote+30b5eb4a-ea4c-401f-9eed-8f551ffc6866-00-1yd46okkcugaa.worf.replit.dev

[17:36:06.141] Using commit id "a4f99b7dfb14460cb0bcebd9f6ac7ca158217920" and quality "stable" for server

[17:36:06.144] Install and start server if needed

[17:41:13.957] getPlatformForHost was canceled

[17:41:13.958] Exec server for ssh-remote+30b5eb4a-ea4c-401f-9eed-8f551ffc6866-00-1yd46okkcugaa.worf.replit.dev failed: Error: Connecting was canceled

[17:41:13.958] Error opening exec server for ssh-remote+30b5eb4a-ea4c-401f-9eed-8f551ffc6866-00-1yd46okkcugaa.worf.replit.dev: Error: Connecting was canceled

What is the purpose of doing this?

To use the features of cursor (like ai generating code) to put that code into replit automatically. I use replit as an easy to deploy online coding environment.

Any updates for a fix on this?

Same problem here on Windows 11

Can you share your logs?

This fixed it for me (perhaps formatting, perhaps the last line, not sure):

Host *.replit.dev
    Port 22
    IdentityFile ~/.ssh/replit
    StrictHostKeyChecking accept-new

Link: SSH | Replit Docs