Solved: unknown terminal xterm-ghostty

Add the following to your (platform specific 1) config file

shell-integration-features = ssh-env, ssh-terminfo

Now reload the configuration.

The configuration can be reloaded at runtime by pressing ctrl+shift+, (Linux) or cmd+shift+, (macOS).


Update: (13 April 2026)

Here is another solution, maybe generic, does not involve updating Ghostty’s config file

infocmp -x xterm-ghostty | ssh YOUR-SERVER -- tic -x -

This would work for other unknown terminal type errors as well. Just replace xterm-ghostty with other terminal type which is giving unknown terminal type error.


  1. on macOS : $HOME/Library/Application\ Support/com.mitchellh.ghostty/config, and $XDG_CONFIG_HOME/ghostty/config for Linux if XDG_CONFIG_HOME is not defined, it defaults to $HOME/.config/ghostty/config↩︎