tmux and screen-256 TERM not supported on remote hosts
You can copy the necessary terminfo descriptions to remote hosts.
On the local system, dump the description to text format:
infocmp xterm-256color > xterm-256color.ti infocmp screen-256color > screen-256color.ti
Copy to the remote host and compile:
tic xterm-256color.ti tic screen-256color.ti
The descriptions will be stored in ~/.terminfo
.
(infocmp
and tic
are part of the ncurses or ncurses-bin packages in most Linux distributions, as well as most BSDs that use ncurses.)
I have this in my .bashrc:
alias ssh='TERM=screen ssh'