Tips: solve the double/random characters when ssh to remote macOS/Ubuntu
When I start to use Ghostty on serveral my servers, found there are some double characters while type remote host with zsh shell.
The simply resolution to append on your shell configuration file.
export TERM=xterm-256color
Here is what I did
JimmyMBA.local ➜ ~ ssh -l jimmy.liao localhost
Last login: Fri Jan 17 13:09:39 2025
JimmyMBA.local ➜ ~ cclearcc ccccccccaabbccdde
JimmyMBA.local ➜ ~ eexitexexxiexiitexit
Connection to localhost closed.
JimmyMBA.local ➜ ~ echo "export TERM=xterm-256color" >> ~/.zshrc
JimmyMBA.local ➜ ~ . ~/.zshrc
JimmyMBA.local ➜ ~ ssh -l jimmy.liao localhost
Last login: Fri Jan 17 13:13:16 2025 from ::1
JimmyMBA.local ➜ ~ clear
Thanks.