Tmux under Kitty terminal

If you receive error messages such as "Terminal unknown, missing or unsuitable terminal" upon logging in, this means the server does not recognize your terminal.

The correct solution is to install the client terminal's terminfo file on the server. This tells console programs on the server how to correctly interact with your terminal. You can get info about current terminfo using infocmp and then find out which package owns it.

If you cannot install it normally, you can copy your terminfo to your home directory on the server:

$ ssh myserver mkdir -p  ~/.terminfo/${TERM:0:1}
$ scp /usr/share/terminfo/${TERM:0:1}/$TERM myserver:~/.terminfo/${TERM:0:1}/

After logging in and out from the server the problem should be fixed.


The accepted answer from @user88036 is a good explanation and a nice generic solution. I recently discovered in the Kitty docs they have a nice utility using their CLI tool. From the docs

This happens because the kitty terminfo files are not available on the server. You can ssh in using the following command which will automatically copy the terminfo files to the server:

kitty +kitten ssh myserver

https://sw.kovidgoyal.net/kitty/faq.html#i-get-errors-about-the-terminal-being-unknown-or-opening-the-terminal-failing-when-sshing-into-a-different-computer

Tags:

Ssh

Tmux

Kitty