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
20.29k stars 337 forks source link

Very slow SSH connecting when ~/.ssh/config has about 3000 hosts in it #4954

Open orloffmax opened 1 month ago

orloffmax commented 1 month ago

Dupe Check

Operating System

MacOS

Operating System and Version

Sonoma 14.5 (23F79)

Local Shell Version

5.9

Remote Shell Version

4.4.20(1)-release

Warp Version

v0.2024.05.21.16.09.stable_02

I have tried commenting out my system & user rcfiles and warp still will not bootstrap

Screenshots

Prerequisites:

  1. 'Warp SSH Wrapper' feature is on
  2. ~/.ssh/config file has about 3000 hosts in it

For some reason when 'Warp SSH Wrapper' feature is on the reading of ~/.ssh/config file happens really slow. It takes about 19-20 seconds before I get the request for password. I execute the following command: ssh host_name

This is the example of configuration in the ~/.ssh/config file for each of 3000 hosts:

Host host_name
    Hostname 000.000.000.000
    Port 20000
    User some.user
    IdentityFile ~/.ssh/id_ed25519

If 'Warp SSH Wrapper' feature is off the connecting happens just in a moment like in all other terminal apps.

Include shell xtrace output

There was no debug output.

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

Yes, this I confirmed 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 1 month 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.

orloffmax commented 1 month ago

Actually, I can't reproduce the issue anymore. I tried to close all the tabs and quit the terminal. After that I ran it again, did ssh connection and got that quick response as it should be. I think, you can close the issue. Thanks.