Verify that the remote host shell TERM setting matches your terminal's term setting (localhost) and that the remote host supports the TERM setting.
E.g.:
- From iTerm (or another terminal app)
$ echo $TERM
xterm-256color
You don't need to open tmux. I am using tmux to force the error since it uses an relatively uncommon terminal config.
- Open tmux (basically another terminal within a terminal app)
$ echo $TERM
tmux-256color
- From tmux run ssh command & check TERM setting
$ ssh <remote host>
.
.
# Logged into remote host now run...
$ echo $TERM
tmux-256color
So tmux communicated to the remote host properly but we have backspace or some other matching key issue. Lets check which terminals the remote host supports.
- From remote host
$ toe -a
xterm-256color xterm with 256 colors
xterm-color generic "ANSI" color xterm (X Window System)
xterm X11 terminal emulator
linux linux console
dumb 80-column dumb tty
ansi ansi/pc-term compatible with color
Looks like the remote host does not support tmux-256color
, the TERM value sent by tmux. It does support xterm-256color
which we know our terminal app supports.
- From remote host change TERM value
export TERM=xterm-256color