If the terminal command clear doesn’t work in SSH sessions when using Ghostty
I use Ghostty as my terminal emulator. I also sometimes connect to remote machines via SSH.
When I type, for example, the command clear into Ghostty during a SSH session, I receive the following error:
'xterm-ghostty': unknown terminal type.
This means that the environment variable TERM has been set to xterm-ghostty by Ghostty, but the remote machine doesn’t recognize this value of TERM. Ghostty isn’t a terminal emulator that your server knows. Read on to learn how to solve this problem.