kovidgoyal / kitty

Cross-platform, fast, feature-rich, GPU based terminal
https://sw.kovidgoyal.net/kitty/
GNU General Public License v3.0
22.13k stars 907 forks source link

`kitten ssh` doesn't show a shell prompt after login #7355

Closed munnik closed 4 weeks ago

munnik commented 4 weeks ago

Describe the bug When using normal ssh I get a shell prompt after login, using the kitten ssh wrapper I don't see a login prompt. Even after waiting for a couple of minutes. This also happens when I try to log in to an Alpine Linux system.

To Reproduce kitten ssh <host>

Screenshots

 munnik  ~  ssh 10.24.0.4
Enter passphrase for key '/home/munnik/.ssh/id_rsa':
Linux m4481 5.10.0-27-amd64 #1 SMP Debian 5.10.205-2 (2023-12-31) x86_64
Last login: Wed Apr 17 11:51:07 2024 from 10.24.0.10
munnik@m4481:~$ exit
logout
Connection to 10.24.0.4 closed.
 munnik  ~  kitten ssh 10.24.0.4

After waiting for a couple of minutes and finally pressing CTRL-C

Shared connection to 10.24.0.4 closed.
 255 ✘ munnik  ~ 

Environment details

kitty 0.33.1 created by Kovid Goyal
Linux nixos 6.6.26 #1-NixOS SMP PREEMPT_DYNAMIC Wed Apr 10 14:36:08 UTC 2024 x86_64

<<< Welcome to NixOS 24.05.20240416.5672bc9 (x86_64) - /dev/tty >>>

Run 'nixos-help' for the NixOS manual.

DISTRIB_CODENAME=uakari
DISTRIB_DESCRIPTION="NixOS 24.05 (Uakari)"
DISTRIB_ID=nixos
DISTRIB_RELEASE="24.05"
LSB_VERSION="24.05 (Uakari)"
Running under: Wayland
Frozen: False
Paths:
  kitty: /nix/store/d03vq9y80w0vkmd9c37jf3zigr8s4v5p-kitty-0.33.1/bin/kitty
  base dir: /nix/store/d03vq9y80w0vkmd9c37jf3zigr8s4v5p-kitty-0.33.1/lib/kitty
  extensions dir: /nix/store/d03vq9y80w0vkmd9c37jf3zigr8s4v5p-kitty-0.33.1/lib/kitty/kitty
  system shell: /run/current-system/sw/bin/zsh
Loaded config files:
  /home/munnik/.config/kitty/kitty.conf

Config options different from defaults:
background_opacity      0.6
font_family             Hasklug Nerd Font Mono
font_size               10.0
shell_integration       frozenset({'no-rc'})
Colors:
    active_border_color     #b4befe   
    active_tab_background   #cba6f7   
    active_tab_foreground   #11111b   
    background              #1e1e2e   
    bell_border_color       #f9e2af   
    color0                  #45475a   
    color1                  #f38ba8   
    color10                 #a6e3a1   
    color11                 #f9e2af   
    color12                 #89b4fa   
    color13                 #f5c2e7   
    color14                 #94e2d5   
    color15                 #a6adc8   
    color2                  #a6e3a1   
    color3                  #f9e2af   
    color4                  #89b4fa   
    color5                  #f5c2e7   
    color6                  #94e2d5   
    color7                  #bac2de   
    color8                  #585b70   
    color9                  #f38ba8   
    cursor                  #f5e0dc   
    cursor_text_color       #1e1e2e   
    foreground              #cdd6f4   
    inactive_border_color   #6c7086   
    inactive_tab_background #181825   
    inactive_tab_foreground #cdd6f4   
    mark1_background        #b4befe   
    mark1_foreground        #1e1e2e   
    mark2_background        #cba6f7   
    mark2_foreground        #1e1e2e   
    mark3_background        #74c7ec   
    mark3_foreground        #1e1e2e   
    selection_background    #f5e0dc   
    selection_foreground    #1e1e2e   
    tab_bar_background      #11111b   
    url_color               #f5e0dc   

Important environment variables seen by the kitty process:
    PATH                                /nix/store/d03vq9y80w0vkmd9c37jf3zigr8s4v5p-kitty-0.33.1/bin:/nix/store/32hx7y3vn8l5wvpzw7jgradnxnlsb6y2-imagemagick-7.1.1-29/bin:/nix/store/2nhjsfc4pg74vqnsbjmnpi7359y6f3wi-ncurses-6.4-dev/bin:/run/wrappers/bin:/home/munnik/.nix-profile/bin:/nix/profile/bin:/home/munnik/.local/state/nix/profile/bin:/etc/profiles/per-user/munnik/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/nix/store/jsjfmx7r6cpyixxsg7bjl5cy3y8hw7k7-binutils-wrapper-2.41/bin:/nix/store/pc6yqwmnzy0xqdzm7j9kxhl0hrmk4p50-pciutils-3.11.1/bin:/nix/store/ac1hb5dc2z4biwgy8mjrhlifffkkrvdq-gcc-wrapper-13.2.0/bin
    LANG                                en_US.UTF-8
    EDITOR                              nano
    SHELL                               /run/current-system/sw/bin/zsh
    DISPLAY                             :0
    WAYLAND_DISPLAY                     wayland-1
    USER                                munnik
    XDG_CONFIG_DIRS                     /etc/xdg:/home/munnik/.nix-profile/etc/xdg:/nix/profile/etc/xdg:/home/munnik/.local/state/nix/profile/etc/xdg:/etc/profiles/per-user/munnik/etc/xdg:/nix/var/nix/profiles/default/etc/xdg:/run/current-system/sw/etc/xdg
    XDG_BACKEND                         wayland
    XDG_SEAT                            seat0
    XDG_SESSION_TYPE                    wayland
    XDG_CURRENT_DESKTOP                 Hyprland
    XDG_SESSION_CLASS                   user
    XDG_VTNR                            1
    XDG_SESSION_ID                      3
    XDG_RUNTIME_DIR                     /run/user/1000
    XDG_DATA_DIRS                       /home/munnik/.nix-profile/share:/nix/profile/share:/home/munnik/.local/state/nix/profile/share:/etc/profiles/per-user/munnik/share:/nix/var/nix/profiles/default/share:/run/current-system/sw/share

Additional context Try to reproduce the problem with kitty --config NONE if you cannot then post a minimal kitty.conf that reproduces the problem. If the problem involves interaction with some other terminal program post a minimal config for that program to reproduce the problem as well.

kovidgoyal commented 4 weeks ago

I'm afraid there isnt anything I can do to help you since, literally any program/command on the remote system could be hanging. You will need to log into it and debug the issue yourself. If you need pointers on how to get started, feel free to ask, I will provide.

kovidgoyal commented 4 weeks ago

Oh one suggestion I do have is, try chaning the interpreter to python, assuming python is available on the remote system. That might either work or give more useful debug data. https://sw.kovidgoyal.net/kitty/kittens/ssh/#opt-kitten-ssh.interpreter

munnik commented 4 weeks ago

I'm afraid there isnt anything I can do to help you since, literally any program/command on the remote system could be hanging. You will need to log into it and debug the issue yourself.

Normal ssh just works fine, but running it with the kitten wrapper does not show a shell prompt.

I just found out that Zellij is somehow causing the issue. If I run it directly from kitty I get a shell prompt after login, running it from within a Zellij workspace causes the issue.

If you need pointers on how to get started, feel free to ask, I will provide.

Are there any verbose options when running kitten ssh?

kovidgoyal commented 4 weeks ago

On Wed, Apr 17, 2024 at 05:10:36AM -0700, Martijn de Munnik wrote:

I'm afraid there isnt anything I can do to help you since, literally any program/command on the remote system could be hanging. You will need to log into it and debug the issue yourself.

Normal ssh just works fine, but running it with the kitten wrapper does not show a shell prompt.

I just found out that Zellij is somehow causing the issue. If I run it directly from kitty I get a shell prompt after login, running it from within a Zellij workspace causes the issue.

Ah, well see the kitty FAQ about terminal multiplexers.