upvote
Doesn't `kitten ssh` solve the problem?

https://sw.kovidgoyal.net/kitty/kittens/ssh/

reply
Doesn't sound like it would work if connecting to a locked down server. However, the problem OP described is easily solved, for ghostty and kitty, by a single line in your local ssh config.
reply
Putting the following in my ~/.ssh/config fixed all ssh-related issues I had with kitty.

  Host *
    SetEnv TERM="xterm-256color"
reply
I've had so many issues with SSH that I ended up ghosttying kitty.
reply
Fixed with a single alias or a single ssh config entry.
reply
Ghostty made that obvious in the documentation for me. I haven't looked at the kitty docs, so Idk if they do as well.
reply
I have the same SSH qualms. I still use it because there's not much better for what I need.
reply
I believe I got rid of most of the issues with some .ssh setting which simply uses the normal xterm I believe. I can't check right at this moment, but apparently, simply using xterm and not the xterm-xkitty or what it's called does not actually make much problems when ssh-ing into a machine - not in my case at least.

It was a setting in some ~/.ssh config file though I believe, not a kitty setting.

reply
I currently just use this in my .zshrc:

alias ssh="kitty +kitten ssh"

sshpass() { TERM=xterm-256color command sshpass "$@"; }

Could also alias sshpass differently but I mostly use that for embedded devices where I just want a simple shell anyways.

The alternative you mean is in ~/.ssh/config:

Host *

    SetEnv TERM="xterm-256color"
reply