wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
17.85k stars 800 forks source link

Password over multiplexer #6140

Closed bipin-lekhak closed 4 weeks ago

bipin-lekhak commented 2 months ago

What Operating System(s) are you seeing this problem on?

Linux X11, macOS

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20240203-110809-5046fc22

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

No, and I'll explain why below

Describe the bug

Can not type password over Multiplexer over ssh connection on remote.

No issue when no mux

  1. SSH into remote without weztermmux using: wezterm ssh my_remote_linux.
  2. Use command requiring sudo and prompted for password: sudo apt update
  3. Prompted password: [sudo] password for user:
  4. Can easily type password

Issue when mux

  1. SSH into remote with weztermmux using: wezterm connect my_remote_linux.
  2. Use command requiring sudo and prompted for password: sudo apt update
  3. Prompted password: [sudo] password for user:
  4. No matter what is typed is not relayed. Not even enter key.

To Reproduce

No response

Configuration

-- Pull in the wezterm API
local wezterm = require "wezterm"
local act = wezterm.action

-- This will hold the configuration.
local config = wezterm.config_builder()

config.ssh_domains = {
    {
        name = "my_remote_linux",
        remote_address = "",
        username = "",
        remote_wezterm_path = ""
    },
},
return config

Expected Behavior

Password works in wezterm multiplexer.

Logs

10:17:25.181  WARN   wezterm_font > No fonts contain glyphs for these codepoints: \u{f578}.
Placeholder glyphs are being displayed instead.
You may wish to install additional fonts, or adjust your
configuration so that it can find them.
https://wezfurlong.org/wezterm/config/fonts.html has more information about configuring fonts.
Set warn_about_missing_glyphs=false to suppress this message.
10:18:55.616  WARN   wezterm_font > No fonts contain glyphs for these codepoints: \u{f578}.
Placeholder glyphs are being displayed instead.
You may wish to install additional fonts, or adjust your
configuration so that it can find them.
https://wezfurlong.org/wezterm/config/fonts.html has more information about configuring fonts.
Set warn_about_missing_glyphs=false to suppress this message.

Anything else?

No response

loops commented 2 months ago

Hi bipin-lekhak,

That's a really strange sounding one. Just a shot in the dark, is it possible you have a different version of wezterm-mux-server running, than the version of your wezterm-gui client? It shouldn't matter, but it's worth making sure your versions are exactly the same, before further debugging.

bipin-lekhak commented 2 months ago

I verified that both the local and remote have same versions of wezterm.

loops commented 2 months ago

You'll have to dig in with some debugging to figure what's going on:

https://wezfurlong.org/wezterm/config/lua/config/debug_key_events.html

You could start with the command:

 wezterm --config debug_key_events=true

Which will give you a better idea of what keys are actually being sent.

I have a wild guess that your enter key is for some reason not being seen as LF on the remote end. If that's right, regular keys are all going through correctly, just not the final enter key. If that's true, then using CTRL-J instead of enter, might work.

bipin-lekhak commented 2 months ago

Yeah, it looks like that is exactly what is happening. Ctrl+J worked.

wez commented 1 month ago

Sounds like something wonky with the stty settings in one versus the other. https://www.man7.org/linux/man-pages/man1/stty.1.html