161 words
1 minutes
How to Fix xterm-kitty Unknown Terminal Type in SSH
hi everyone! I’m back with another tutorial for you all. This time, I’ll show you how to fix the xterm-kitty: unknown terminal type
error when connecting to a remote server via SSH. This error can be quite frustrating, but don’t worry—I’ll guide you through the process step by step.
Steps
1. Open Shell Configuration File
First, we need to open the shell configuration file. You can use any text editor you prefer, but for this tutorial, I’ll use helix
. Open your terminal and run the following command:
# Bash
helix ~/.bashrc
# Zsh
helix ~/.zshrc
2. Modify Kitty Environment Variable
Next, we need to check if the TERM
environment variable is set to xterm-kitty
. If it is, we need to change it to xterm-256color
while connecting via SSH. Add the following alias to your shell configuration file:
[[ "$TERM" == "xterm-kitty" ]] && alias ssh="TERM=xterm-256color ssh"
3. Save and Apply Changes
Save the file and apply the changes by running the following command:
# Bash
source ~/.bashrc
# Zsh
source ~/.zshrc
How to Fix xterm-kitty Unknown Terminal Type in SSH
https://blog.rei.my.id/posts/7/how-to-fix-xterm-kitty-unknown-terminal-type-in-ssh/