Ssh remote and multiplex server not success

Describe the Bug

2025-06-15 13:26:59.164 [info] (ssh_tunnel) stdout: /home/shicc/.cursor-server/bin/multiplex-server/1f3345b44ce6674a5b8be03c6dceb7e47d7d58164d5611843746561cfb16f620.js:1
“use strict”;var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},__assign.apply(this,arguments)};Object.defineProperty(exports,“__esModule”,{value:!0});var net_1=require(“net”),child_process_1=require(“child_process”),crypto_1=require(“crypto”),token=process.argv[2];token||(console.error(“Token must be provided as the first argument”),process.exit(1));var inactivityTimer,server=(0,net_1.createServer)({keepAlive:!0},(function(e){console.log(“Server received connection”),resetInactivityTimer();var r,o,t=Buffer.alloc(0);e.on(“close”,(function(){console.log(“[remoteServer][”.concat(o,“] Socket closed; killing child process”)),r&&r.pid&&!r.killed&&((null==r?void 0:r.kill())||console.error(“[remoteServer][”.concat(o,“] Failed to kill child process”)))})),e.on(“data”,(function(n){var i,s,c;if(t=Buffer.concat([t,n]),void 0===r){var a=t.indexOf(Buffer.from("

SyntaxError: Invalid or unexpected token
at wrapSafe (node:internal/modules/cjs/loader:1378:20)
at Module._compile (node:internal/modules/cjs/loader:1428:41)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:173:12)
at node:internal/main/run_main_module:28:49

Node.js v20.18.2
fc072310e41c4ecd813c93c4: start
exitCode==1==
nodeExecutable==/home/shicc/.cursor-server/bin/53b99ce608cba35127ae3a050c1738a959750860/node==
multiplexListeningOn====
multiplexConnectionToken==45ff84cb-8dc8-4736-9d02-ce6955a4de7c==
codeListeningOn====
errorMessage==Multiplex server did not start successfully==
isFatalError====
codeConnectionToken====
detectedPlatform==linux==
arch==x64==
SSH_AUTH_SOCK====
fc072310e41c4ecd813c93c4: end

2025-06-15 13:26:59.165 [info] Server install command exit code: 1
2025-06-15 13:26:59.166 [error] Error installing server: Couldn’t install Cursor Server, install script returned non-zero exit status: Multiplex server did not start successfully
2025-06-15 13:26:59.166 [info] Deleting local script C:\Users\shicc\AppData\Local\Temp\cursor_remote_install_84208.sh
2025-06-15 13:26:59.167 [error] Error resolving SSH authority Couldn’t install Cursor Server, install script returned non-zero exit status: Multiplex server did not start successfully
2025-06-15 13:26:59.167 [info] (ssh_tunnel) stdout: Checking for code servers

2025-06-15 13:26:59.175 [info] (ssh_tunnel) stdout: Code server script is not running

2025-06-15 13:26:59.177 [info] (ssh_tunnel) stdout: Starting code server script --start-server --host=127.0.0.1 --port 0 --connection-token-file --telemetry-level off --enable-remote-auto-shutdown --accept-server-license-terms &> &

2025-06-15 13:27:09.198 [info] (ssh_tunnel) stdout: Error code server did not start successfully

2025-06-15 13:27:09.198 [info] (ssh_tunnel) stdout: print_install_results_and_wait
2025-06-15 13:27:09.199 [info] (ssh_tunnel) stdout: zsh: no matches found: /home/shicc/.cursor-server/.*.code.log
用法: grep [选项]… 模式 [文件]…
尝试使用 ‘grep --help’ 来获得更多信息。
touch: 缺少了文件操作数
请尝试执行 “touch --help” 来获取更多信息。
chmod: “600” 后缺少操作数
请尝试执行 “chmod --help” 来获取更多信息。
bash: 行 24: $CODE_SERVER_TOKENFILE:模糊的重定向
bash: 行 38: $CODE_SERVER_PIDFILE:模糊的重定向
bash: 行 37: $CODE_SERVER_LOGFILE:模糊的重定向
bash: 行 52: print_install_results_and_exit:未找到命令
bash: 行 69: print_install_results_and_exit:未找到命令

2025-06-15 13:27:09.236 [info] (ssh_tunnel) stderr: debug1: client_input_channel_req: channel 2 rtype exit-status reply 0

2025-06-15 13:27:09.236 [info] (ssh_tunnel) stderr: debug1: channel 2: free: client-session, nchannels 3

2025-06-15 13:27:09.237 [info] (ssh_tunnel) stderr: debug1: channel 0: free: port listener, nchannels 2

2025-06-15 13:27:09.237 [info] (ssh_tunnel) stderr: debug1: channel 1: free: port listener, nchannels 1

2025-06-15 13:27:09.237 [info] (ssh_tunnel) stderr: Transferred: sent 27020, received 8228 bytes, in 21.3 seconds

2025-06-15 13:27:09.238 [info] (ssh_tunnel) stderr: Bytes per second: sent 1270.2, received 386.8

2025-06-15 13:27:09.238 [info] (ssh_tunnel) stderr: debug1: Exit status 0

2025-06-15 13:27:09.353 [info] (ssh_tunnel): exit: code=0 signal=null

Steps to Reproduce

install v1.0.0 version

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

版本: 1.0.0 (user setup)
提交: 1.96.2
日期: 53b99ce608cba35127ae3a050c1738a959750860
Electron: 2025-06-04T19:44:25.253Z
ElectronBuildId: 34.5.1
Chromium: undefined
Node.js: 132.0.6834.210
V8: 20.19.0
OS: 13.2.152.41-electron.0

more log info:
/home/shicc/.cursor-server/bin/multiplex-server/1f3345b44ce6674a5b8be03c6dceb7e47d7d58164d5611843746561cfb16f620.js:1
“use strict”;var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},__assign.apply(this,arguments)};Object.defineProperty(exports,“__esModule”,{value:!0});var net_1=require(“net”),child_process_1=require(“child_process”),crypto_1=require(“crypto”),token=process.argv[2];token||(console.error(“Token must be provided as the first argument”),process.exit(1));var inactivityTimer,server=(0,net_1.createServer)({keepAlive:!0},(function(e){console.log(“Server received connection”),resetInactivityTimer();var r,o,t=Buffer.alloc(0);e.on(“close”,(function(){console.log(“[remoteServer][”.concat(o,“] Socket closed; killing child process”)),r&&r.pid&&!r.killed&&((null==r?void 0:r.kill())||console.error(“[remoteServer][”.concat(o,“] Failed to kill child process”)))})),e.on(“data”,(function(n){var i,s,c;if(t=Buffer.concat([t,n]),void 0===r){var a=t.indexOf(Buffer.from("

SyntaxError: Invalid or unexpected token
at wrapSafe (node:internal/modules/cjs/loader:1378:20)
at Module._compile (node:internal/modules/cjs/loader:1428:41)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:173:12)
at node:internal/main/run_main_module:28:49

Node.js v20.18.

the error from js file:
node /home/shicc/.cursor-server/bin/88a47f0edd42a2ba73afb018ada9fe9eda7df750/node /home/shicc/.cursor-server/bin/multiplex-server/1f3345b44ce6674a5b8be03c6dceb7e47d7d58164d5611843746561cfb16f620.js token
2025-06-15 14:34:39.355 [info] (ssh_tunnel) stdout: /home/shicc/.cursor-server/bin/multiplex-server/1f3345b44ce6674a5b8be03c6dceb7e47d7d58164d5611843746561cfb16f620.js:1
“use strict”;var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},__assign.apply(this,arguments)};Object.defineProperty(exports,“__esModule”,{value:!0});var net_1=require(“net”),child_process_1=require(“child_process”),crypto_1=require(“crypto”),token=process.argv[2];token||(console.error(“Token must be provided as the first argument”),process.exit(1));var inactivityTimer,server=(0,net_1.createServer)({keepAlive:!0},(function(e){console.log(“Server received connection”),resetInactivityTimer();var r,o,t=Buffer.alloc(0);e.on(“close”,(function(){console.log(“[remoteServer][”.concat(o,“] Socket closed; killing child process”)),r&&r.pid&&!r.killed&&((null==r?void 0:r.kill())||console.error(“[remoteServer][”.concat(o,“] Failed to kill child process”)))})),e.on(“data”,(function(n){var i,s,c;if(t=Buffer.concat([t,n]),void 0===r){var a=t.indexOf(Buffer.from("

SyntaxError: Invalid or unexpected token
at wrapSafe (node:internal/modules/cjs/loader:1378:20)
at Module._compile (node:internal/modules/cjs/loader:1428:41)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:173:12)
at node:internal/main/run_main_module:28:49

Node.js v20.18.2

Hi, thanks for sharing this issue and logs.

To help figure out what’s going on, could you please provide the following?

  • What version of the remote ssh extension are you using?
  • What operating system is your remote machine?
  • Have you tried clicking the reinstall server button, and is it this error every time?

Thanks!

  1. [version] remote ssh extension = “remote-ssh-1.0.8” and “remote-ssh-1.0.11”
    2, operating system is your remote machine
    |Distributor ID:|Ubuntu|
    |—|—|
    |Description:|Ubuntu 20.04.6 LTS|
    |Release:|20.04|
    |Codename:|focal|
  2. Have you tried clicking the reinstall server button
    [yes] I also delete cursor server folder in the remote machine

Could you also share the output of running cat /home/shicc/.cursor-server/bin/88a47f0edd42a2ba73afb018ada9fe9eda7df750/node /home/shicc/.cursor-server/bin/multiplex-server/1f3345b44ce6674a5b8be03c6dceb7e47d7d58164d5611843746561cfb16f620.js on your remote machine?

It would be helpful to know what is actually being written into this file. Thanks!

Sure

/home/shicc/.cursor-server/bin/88a47f0edd42a2ba73afb018ada9fe9eda7df750/node /home/shicc/.cursor-server/bin/multiplex-server/1f3345b44ce6674a5b8be03c6dceb7e47d7d58164d5611843746561cfb16f620.js

I run the code
will show the error:

/home/shicc/.cursor-server/bin/multiplex-server/1f3345b44ce6674a5b8be03c6dceb7e47d7d58164d5611843746561cfb16f620.js:1
"use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},__assign.apply(this,arguments)};Object.defineProperty(exports,"__esModule",{value:!0});var net_1=require("net"),child_process_1=require("child_process"),crypto_1=require("crypto"),token=process.argv[2];token||(console.error("Token must be provided as the first argument"),process.exit(1));var inactivityTimer,server=(0,net_1.createServer)({keepAlive:!0},(function(e){console.log("Server received connection"),resetInactivityTimer();var r,o,t=Buffer.alloc(0);e.on("close",(function(){console.log("[remoteServer][".concat(o,"] Socket closed; killing child process")),r&&r.pid&&!r.killed&&((null==r?void 0:r.kill())||console.error("[remoteServer][".concat(o,"] Failed to kill child process")))})),e.on("data",(function(n){var i,s,c;if(t=Buffer.concat([t,n]),void 0===r){var a=t.indexOf(Buffer.from("
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

SyntaxError: Invalid or unexpected token
    at wrapSafe (node:internal/modules/cjs/loader:1378:20)
    at Module._compile (node:internal/modules/cjs/loader:1428:41)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:173:12)
    at node:internal/main/run_main_module:28:49

Node.js v20.18.2```

I run the code : cat /home/shicc/.cursor-server/bin/multiplex-server/1f3345b44ce6674a5b8be03c6dceb7e47d7d58164d5611843746561cfb16f620.js
the source code is

cat /home/shicc/.cursor-server/bin/multiplex-server/1f3345b44ce6674a5b8be03c6dceb7e47d7d58164d5611843746561cfb16f620.js
"use strict";var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var r,o=1,t=arguments.length;o<t;o++)for(var n in r=arguments[o])Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);return e},__assign.apply(this,arguments)};Object.defineProperty(exports,"__esModule",{value:!0});var net_1=require("net"),child_process_1=require("child_process"),crypto_1=require("crypto"),token=process.argv[2];token||(console.error("Token must be provided as the first argument"),process.exit(1));var inactivityTimer,server=(0,net_1.createServer)({keepAlive:!0},(function(e){console.log("Server received connection"),resetInactivityTimer();var r,o,t=Buffer.alloc(0);e.on("close",(function(){console.log("[remoteServer][".concat(o,"] Socket closed; killing child process")),r&&r.pid&&!r.killed&&((null==r?void 0:r.kill())||console.error("[remoteServer][".concat(o,"] Failed to kill child process")))})),e.on("data",(function(n){var i,s,c;if(t=Buffer.concat([t,n]),void 0===r){var a=t.indexOf(Buffer.from("
"));if(-1===a)return;var d=t.subarray(0,a).toString();t=t.subarray(a+1);var l=void 0;try{l=JSON.parse(d)}catch(r){return console.error("Error parsing JSON command:",r),void e.destroy()}if(l.token!==token)return console.error("Invalid token:",l.token),e.write(JSON.stringify({type:"exit",code:401})+"
"),void e.end();o=null!==(i=l.id)&&void 0!==i?i:(0,crypto_1.randomUUID)(),console.log("[command][".concat(o,"] Executing command: ").concat(l.command," ").concat((null!==(s=l.args)&&void 0!==s?s:[]).join(" "))),(r=(0,child_process_1.spawn)(l.command,null!==(c=l.args)&&void 0!==c?c:[],{env:__assign(__assign({},process.env),l.env),cwd:l.cwd,shell:!1,stdio:"pipe"})).stdout.on("data",(function(r){var o={type:"stdout",data:r.toString("base64")};e.write(JSON.stringify(o)+"
")})),r.stdout.on("end",(function(){e.write(JSON.stringify({type:"stdout-end"})+"
")})),r.stderr.on("data",(function(r){var o={type:"stderr",data:r.toString("base64")};e.write(JSON.stringify(o)+"
")})),r.stderr.on("end",(function(){e.write(JSON.stringify({type:"stderr-end"})+"
")}));var u=!1;r.on("error",(function(r){u?console.log("[command][".concat(o,"] Process exited with error but we already sent an exit message"),r):(u=!0,console.error("[command][".concat(o,"] Process error"),r),e.write(JSON.stringify({type:"exit",code:1})+"
"),e.end())})),r.on("exit",(function(r){if(u)console.log("[command][".concat(o,"] Process exited with code ").concat(r," but we already sent an exit message"));else{u=!0,console.log("[command][".concat(o,"] Process exited with code ").concat(r,". Sending exit message"));var t={type:"exit",code:null!==r?r:0};e.write(JSON.stringify(t)+"
"),e.end()}}))}var v=t.indexOf(0);if(-1!==v){var f=t.subarray(0,v);try{var g=Buffer.from(f.toString("utf-8"),"base64");r.stdin.write(g)}catch(o){return console.error("Error decoding base64 data:",o),e.destroy(),void r.kill("SIGKILL")}return r.stdin.end(),void(t=Buffer.alloc(0))}var y=4*Math.floor(t.length/4);if(0!==y){var p=t.subarray(0,y);t=t.subarray(y);try{g=Buffer.from(p.toString("utf-8"),"base64"),r.stdin.write(g)}catch(o){return console.error("Error decoding base64 data:",o),r.kill("SIGKILL"),void e.destroy()}}})),e.on("error",(function(e){console.error("[remoteServer][".concat(o,"] Socket error:"),e),r&&r.kill("SIGKILL")}))}));function resetInactivityTimer(){inactivityTimer&&clearTimeout(inactivityTimer),inactivityTimer=setTimeout((function(){console.error("No connections received for 5 minutes, shutting down..."),process.exit(0)}),3e5)}resetInactivityTimer(),server.listen({host:"127.0.0.1",port:0},(function(){var e=server.address();null===e&&(console.error("Failed to get server address"),process.exit(1)),"string"==typeof e&&(console.error("Invalid address: ".concat(e)),process.exit(1)),console.log("Server listening on ".concat(e.port))})),process.on("SIGINT",(function(){server.close((function(){console.log("Server closed"),process.exit(0)}))}));

I run the code
"cat /home/shicc/.cursor-server/bin/88a47f0edd42a2ba73afb018ada9fe9eda7df750/node"
too much binary code, can you tell me what key info you want? Node.js is “v20.18.2”

Thanks, yes meant to ask for just the script file, not the node binary.

It looks like there is some sort of escaping / encoding issue that is causing corruption of the script. Version 1.0.12 switches how the encoding is performed to make it more resilient. Could you try upgrading to that version and share whether it works for you? Thanks!

Sure I delete all versions and configs in my computer and then reinstall cursor
It seem ok now
thanks you~

hello, ravirahman.
I meet the same perblem, chould you have a look mine. Think you very much;

url: [Remote SSH]: Code server did not start successfully

(replied on your other post)