Skip to content

Existing SSH Sessions Not Reused with ControlMaster #45271

@sghng

Description

@sghng

Reproduction steps

Here's my sample SSH config:

Host server
	HostName example.com
	User xxx
	ControlMaster auto
        ControlPath ~/.ssh/cm-%r@%h:%p
	ForwardAgent yes
	ControlPersist yes

Launch an SSH session in terminal emulator, then connect to this remote in Zed.

I looked at the source code (ssh.rs), it seems like Zed opens a multiplexed session when connecting to remote for its terminal/SFTP file browser explicityly with -o ControlMaster=yes. It would be nice for it to detect an existing session defined in the.ssh/config to reuse.

Current vs. Expected behavior

Current behavior: Zed still prompts me to input password.

Expected behavior: Zed should reuse the existing ControlMaster SSH session.

Zed version and system specs

Zed: v0.217.2+stable.102.3d2e6ee76b4d9a932248242506611985cae6b0a8 (Zed)
OS: macOS 26.1
Memory: 36 GiB
Architecture: aarch64

Attach Zed log file

Zed.log

Relevant Zed settings

settings.json

Relevant Keymap

keymap.json

(for AI issues) Model provider details

No response

If you are using WSL on Windows, what flavor of Linux are you using?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    frequency:commonBugs that happen for at least a third of the users across all platforms and kinds of usageplatform:remoteRemote development, SSH and zed-remote-serverpriority:P3Papercuts, minor issues with a clear workaround, cosmetic bugsstate:needs reproNeeds reproduction steps and/or someone to reproduce

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions