I'm currently using Fedora 18 gnome-terminal, then started tmux multiplexer in it. After I connected to a CentOS 5 server via ssh command, I find:ls result has no colortmux, screen, hexedit, htop all failed to start with error message like: open terminal failed: missing or unsuitable terminal: screen-256colorIt seems that ssh passes the $TERM environment variable to the server, but I can't find it in /etc/ssh/ssh_config file of Fedora 18.Although I can manually change the $TERM variable on the server, each time I connect, it happens again. So how to prevent it?
Prevent SSH client passing TERM environment variable to server?
ssh;terminal;environment variables;gnome terminal
$TERM is to tell applications what terminal they're talking to so they know how to talk to it.Change it to a value supported by the remote host and that matches as closely as possible your terminal (screen).Most Linux systems should at least have a screen terminfo entry. If not, screen implements a superset of vt100 and vt100 is universal. So:TERM=screen ssh hostorTERM=vt100 ssh hostIf you do need the 256 color support, you could try xterm-256color which should be close enough (screen supports 256 colors the same way xterm does) and tell applications your terminal application supports 256 colors and tell them how to use them.Or you can install the terminfo entry on the remote host.infocmp -x | ssh -t root@remote-host '  cat > $TERM.info && tic -x $TERM.info'