Skip to content

Remote Projects reject shell-quoted SSH commands #61101

Description

@zozo123

Reproduction steps

  1. Build Zed from latest main (b562439e93).
  2. Open Remote Projects and choose Connect New Server.
  3. Paste a valid SSH command whose executable and arguments are shell-quoted, such as the command emitted by crabbox ssh --id <lease>:
'ssh' '-i' '/Users/test/Library/Application Support/crabbox/testboxes/lease/id_ed25519' '-p' '64042' '-o' 'ControlMaster=auto' 'crabbox@127.0.0.1'

Current vs. expected behavior

Current: Zed rejects the command because SshConnectionOptions::parse_command_line removes only a literal, unquoted ssh prefix before tokenizing. The first parsed token becomes the hostname, so the actual destination is rejected as an extra argument.

Expected: after POSIX tokenization, Zed should treat a leading ssh token as the optional executable. This should preserve support for bare destinations and for a host literally named ssh.

The generated command itself was verified against a live Crabbox local-container lease; it connected and read the synced checkout successfully.

Zed version and system specs

Zed: latest main b562439e93
OS: macOS 26.5.1
Architecture: arm64

Metadata

Metadata

Assignees

No one assigned

    Labels

    frequency:uncommonBugs that happen for a small subset of users, special configurations, rare circumstances, etcplatform:remoteRemote development, SSH and zed-remote-serverpriority:P2Average run-of-the-mill bugsstate:needs reproNeeds reproduction steps and/or someone to reproduce

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions