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.55k stars 379 forks source link

"sudo su -`" hangs in ssh session #4551

Open lordpengwin opened 8 months ago

lordpengwin commented 8 months ago

Discord username (optional)

No response

Describe the bug

Recently i discovered that doing: sudo su - while in an ssh session on a remote host, the session just hangs. The only way to get out of it is to hit CTRL-D and you end up back at the command line that you sudo'ed from. This seems like a recent problem as I was able to do this a few weeks ago.

Note this is using Warp on a Mac connecting through ssh to a linux (centos) box. I've also tried putting sudo and ssh in the blocklist for Subshells

To reproduce

  1. ssh user@remotehost
  2. sudo su - things hang here

Expected behavior

Should end up in a root shell

Screenshots

No response

Operating system

MacOS

Operating system and version

14.1.1

Shell Version

GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)

Current Warp version

v0.2024.03.05.08.02.stable_01

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

About 2-4 weeks ago

Additional context

No response

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:b9d78064-c89e-4973-b153-5178a31ee54e

None

dannyneira commented 8 months ago

As a workaround, add command ssh and sudo su in the subshell menu in Warp, this will trigger the "Warpify" option on remote session and sudo subshell. (in my example I'm using minikube ssh instead of command ssh) https://docs.warp.dev/features/subshells

https://github.com/warpdotdev/Warp/assets/16809145/27d5740c-9d86-4b6b-b8e8-d7077cd16379

lordpengwin commented 8 months ago

That didn't work but my problem seems to be limited to one machine, so it must be something about that machine that it does not like.

piellick commented 6 months ago

hi @dannyneira same issue for me.

Two cases:

lordpengwin commented 6 months ago

The problem seems to have gone away for me on the current version of warp (i haven't used it in a while so i don't know when it actually went away). I'm on version v0.2024.05.28.08.02.stable_00

piellick commented 6 months ago

Ok thanks but not for me .. on v0.2024.05.28.08.02.stable_00 on fedora linux37

DenisMkS commented 1 month ago

I have the same issue, but with sudo -i. Actually it not freezes but just doesn't show a prompt. I can enter any command and it will be executed. But sudo su - works.

tavdog commented 2 weeks ago

Just updated warp and this happens to me too doing sudo -s I added sudo -s to subshell command but it still forces me to do ctrl-i to make it work. very annoying.