warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
21.38k stars 373 forks source link

SSH ControlMaster works well in Terminal but fails in Warp. #5242

Open jxl152 opened 2 months ago

jxl152 commented 2 months ago

Dupe Check

Operating System

MacOS

Operating System and Version

Ventura 13.6.7

Local Shell Version

3.2.57(1)-release

Remote Shell Version

4.4.20(1)-release

Warp Version

v0.2024.08.13.08.02.stable_03

Have you tried commenting out my system & user rc files?

Screenshots

I set ControlMaster in my local SSH config file as follows:

image

When I run the command ssh berzelius1 in Terminal, it generates the correct socket such as: cm-x_jilan@berzelius1.nsc.liu.se:22. After that, I can connect to the server via SSH in a new session without needing a password or verification code.

However, when running the same command in Warp, it doesn't generate the correct socket but one named with a sequence of numbers, as shown below:

image

Although I can still connect to the server, when I try to connect to the same server in a new session, I have to re-enter the password and verifcation code, which suggests that Warp has issues with the utilization of ControlMaster in my case.

Include shell xtrace output

WARP_DEBUG_MODE=1 ssh berzelius1
(x_jilan@berzelius1.nsc.liu.se) Password:
(x_jilan@berzelius1.nsc.liu.se) Verification code:

There is no other output.

Does this block you from using Warp daily?

No

Is this an issue only in Warp?

Yes, I confirmed that this only happens in Warp, not other terminals.

Warp Internal (ignore) - linear-label:e7dfaa84-5fdb-4a00-b754-d8912da923fa

None

Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e

None

dannyneira commented 2 months ago

Warp has an SSH Wrapper that enables features (like the blocks, prompt, completions, etc.) on remote machines requiring the default prompt on the remote machine to be either bash or zsh.

As a workaround you can add command ssh to your Settings > Subshells > Added commands menu, then run command ssh <user@server> to connect to remote session, this will attempt to enable Warp features as a subshell.

You can also try disabling the SSH Wrapper by navigating to Settings > Features. Blocks will stop working but with it disabling, SSH should work as normal.

Related docs: https://docs.warp.dev/features/ssh https://docs.warp.dev/features/subshells

If those don't work, please let us know.