Bug Report: Remote-SSH Server Fails to Start Due to Argument-Parsing/Quoting Error (getaddrinfo ENOTFOUND)

Summary
Following the recent automatic update to version 1.1.1 of the anysphere.remote-ssh extension, remote SSH connections fail completely. The extension’s local setup script misinterprets or malforms the string arrays when constructing the remote server’s initialization command. This forces the remote Node.js environment to evaluate separate flag values as a single hostname string, causing an immediate crash.
Root Cause Analysis
In default TCP loopback mode, the local extension builds a startup shell command containing --host=127.0.0.1 and --port 0. Due to a bug introduced in v1.1.1, these arguments are passed to the remote terminal inside a single bundled string array element or with improper escaping.
When the server attempts to spin up via Node.js, the internal DNS/networking lookup (getaddrinfo) receives "127.0.0.1 --port 0" as a literal hostname string instead of interpreting them as an IPv4 address and a port flag.
Relevant Log Snippet

[Extension host agent started.
Error occurred in server
Error: getaddrinfo ENOTFOUND 127.0.0.1 --port 0
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: '127.0.0.1 --port 0'
}
ErrorMessage==Code server did not start successfully==
[error] Error installing server: [o [RemoteSSHError]: Couldn't install Cursor Server, install script returned non-zero exit status: Code server did not start successfully

Environment

  • Local Machine: macOS

  • Remote Machine: Linux x64

  • Cursor Remote-SSH Version: 1.1.1 (Broken)

  • VS Code Behavior: Works perfectly (standard VS Code Remote-SSH does not suffer from this custom argument grouping bug).

Temporary Workaround
Downgrading the local anysphere.remote-ssh extension to a prior stable version (e.g., 1.0.54) completely resolves the issue, confirming the regression is hardcoded into the latest extension bundle.

Generated by Gemini 3.5 Flash (Paid Tier)

Hi there!

We detected that this may be a bug report, so we’ve moved your post to the Bug Reports category.

To help us investigate and fix this faster, could you edit your original post to include the details from the template below?

Bug Report Template - Click to expand

Where does the bug appear (feature/product)?

  • Cursor IDE
  • Cursor CLI
  • Background Agent (GitHub, Slack, Web, Linear)
  • BugBot
  • Somewhere else…

Describe the Bug
A clear and concise description of what the bug is.


Steps to Reproduce
How can you reproduce this bug? We have a much better chance at fixing issues if we can reproduce them!


Expected Behavior
What is meant to happen here that isn’t working correctly?


Screenshots / Screen Recordings
If applicable, attach images or videos (.jpg, .png, .gif, .mp4, .mov)


Operating System

  • Windows 10/11
  • MacOS
  • Linux

Version Information

  • For Cursor IDE: Menu → About Cursor → Copy
  • For Cursor CLI: Run agent about in your terminal
IDE:
Version: 2.xx.x
VSCode Version: 1.105.1
Commit: ......

CLI:
CLI Version 2026.01.17-d239e66

For AI issues: which model did you use?
Model name (e.g., Sonnet 4, Tab…)


For AI issues: add Request ID with privacy disabled
Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1
For Background Agent issues, also post the ID: bc-…


Additional Information
Add any other context about the problem here.


Does this stop you from using Cursor?

  • Yes - Cursor is unusable
  • Sometimes - I can sometimes use Cursor
  • No - Cursor works, but with this issue

The more details you provide, the easier it is for us to reproduce and fix the issue. Thanks!

hey @Chenyang_Xu, thanks for the detailed report. This indeed seems a new regression in version 1.1.1, which is separate from the recent v1.0.51 authority parsing issues. It would be great of you could share your Cursor version (Help → About), macOS version, remote Linux distro, and the full Output → Remote - SSH log from a failed 1.1.1 attempt, that’ll help the team track it down.

// Cursor version
➜ ~ cursor --version
3.7.21
517f696d8ab6c53eb04fbfdaae705cd146bf3460
arm64

// MacOS version
Tahoe 26.5.1 

// remote Linux distro
NAME="Rocky Linux"
VERSION="8.9 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.9"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.9 (Green Obsidian)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:8:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2029-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-8"
ROCKY_SUPPORT_PRODUCT_VERSION="8.9"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.9"

// Full log
[info] Resolving ssh remote authority 'vm' (Unparsed 'ssh-remote+7b22686f73744e616d65223a22766d227d') (attempt #1)
[info] SSH askpass server listening on /var/folders/ys/fj0j648j42z701rd858svfyw0000gp/T/cursor-ssh-mEN2xo/socket.sock
[info] Using configured platform linux for remote host vm
[info] Launching SSH server via shell with command: cat "/var/folders/ys/fj0j648j42z701rd858svfyw0000gp/T/cursor_remote_install_49500dc7-347a-4601-ba9f-4d3013f429b6.sh" | ssh -T -D 51975 vm bash --login -c bash
[info] Started installation script. Waiting for it to finish...
[info] (ssh_tunnel) stdout: Configuring Cursor Server on Remote
[info] SSH connection established after 3286ms (first stdout received)
[info] (ssh_tunnel) stdout: Using TMP_DIR: /run/user/45107
[info] (ssh_tunnel) stdout: Server script already installed in /home/chenyangx/.cursor-server/bin/linux-x64/517f696d8ab6c53eb04fbfdaae705cd146bf3460/bin/cursor-server
[info] (ssh_tunnel) stdout: v20.18.2
[info] (ssh_tunnel) stdout: Starting code server script /home/chenyangx/.cursor-server/bin/linux-x64/517f696d8ab6c53eb04fbfdaae705cd146bf3460/bin/cursor-server --start-server --host=127.0.0.1 --port 0  --connection-token-file /run/user/45107/cursor-remote-code.token.d1b8f8ad753faa63a12749083a14b29f --telemetry-level off --enable-remote-auto-shutdown --accept-server-license-terms &> /run/user/45107/cursor-remote-code.log.d1b8f8ad753faa63a12749083a14b29f &
[info] (ssh_tunnel) stdout: Code server started with PID 1305393
[info] (ssh_tunnel) stdout: Waiting for code server to start... (90s elapsed)
[info] (ssh_tunnel) stdout: Error code server did not start successfully
[info] (ssh_tunnel) stdout: [11:11:16] Extension host agent started.
[11:11:16] Error occurred in server
[11:11:16] Error: getaddrinfo ENOTFOUND 127.0.0.1 --port 0
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26) {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: '127.0.0.1 --port 0'
}
[info] Server install command exit code:  1
[error] Error installing server: [o [RemoteSSHError]: Couldn't install Cursor Server, install script returned non-zero exit status: Code server did not start successfully

Hey all - we released a fix in Remote - SSH version 1.1.2!

After upgrading Remote - SSH, you may also need to remove cursor-server on your remote host:

  • ssh directly into the host
  • run pkill cursor-server -f

Awesome! Thanks @Matt_Ruhlin and the team!