kitty terminal over SSH: ‘xterm-kitty’: unknown terminal type
Remote hosts don’t have kitty’s terminfo, so nano, less, tput and line editing fail with Error opening terminal: xterm-kitty. and similar. Connect with kitten ssh (it copies the terminfo and sets up shell integration), or copy the terminfo once with infocmp -a xterm-kitty | ssh host tic -x -o ~/.terminfo /dev/stdin.
- Status
- working
- Verified
- (0 days before this build)
- How
- Error messages reproduced verbatim with TERM=xterm-kitty on an Ubuntu 24.04 server without kitty terminfo (nano 7.2, less, tput). Fix commands checked against kitty’s official ssh-kitten docs and FAQ on 2026-11-09; they were not re-run on that date because the verifying machine had no kitty installed.
- Applies to
remoteany host without the xterm-kitty terminfo entry; reproduced on Ubuntu 24.04 LTSterminalkitty with the `kitten` command (ssh kitten auto shell integration since 0.25.0)
Symptom
After ssh from kitty, programs on the remote side fail or misbehave. Messages reproduced on Ubuntu 24.04:
$ nano -> Error opening terminal: xterm-kitty.
$ less <file> -> WARNING: terminal is not fully functional
$ tput cols -> tput: unknown terminal "xterm-kitty"
Some shells and tools print 'xterm-kitty': unknown terminal type. instead. Arrow keys and other function keys may also stop working.
Cause
kitty sets TERM=xterm-kitty, and the remote host has no terminfo entry for it. Check on the remote host with infocmp xterm-kitty; it fails when the entry is missing.
Fix
Use kitty’s SSH kitten, a drop-in replacement for ssh. It copies the kitty terminfo database to the remote host and sets up shell integration there:
kitten ssh user@host
The official docs suggest a short alias:
alias s="kitten ssh"
To replace ssh itself, but only when you are actually inside kitty, add this to ~/.bashrc or ~/.zshrc:
[ "$TERM" = "xterm-kitty" ] && alias ssh="kitten ssh"
Older kitty releases documented the same kitten as kitty +kitten ssh.
Alternatives
- Copy the terminfo once per remote host (from kitty’s docs, “Copying terminfo files manually”):
infocmp -a xterm-kitty | ssh myserver tic -x -o ~/.terminfo /dev/stdin - If the distribution packages it, install
kitty-terminfoon the remote host. - For
sudoon the remote host, keep the variables withDefaults env_keep += "TERM TERMINFO"(viasudo visudo). - Fall back for one session:
TERM=xterm-256color ssh user@host. You lose kitty-specific features.
Sources: https://sw.kovidgoyal.net/kitty/kittens/ssh/, https://sw.kovidgoyal.net/kitty/faq/
Search terms
'xterm-kitty': unknown terminal type.Error opening terminal: xterm-kitty.tput: unknown terminal "xterm-kitty"WARNING: terminal is not fully functionalkitten ssh
Written and verified by Gyuwon Seol (seolcu). If this page solved your problem, you can support the work.
Published 2025-10-11 · last changed 2026-11-09 · Markdown source