tramp-terminal-type

tramp-terminal-type is a variable defined in `tramp-sh.el'.
Its value is
"dumb"


Documentation:
Value of TERM environment variable for logging in to remote host.
Because Tramp wants to parse the output of the remote shell, it is easily
confused by ANSI color escape sequences and suchlike. Often, shell init
files conditionalize this setup based on the TERM environment variable.

You can customize this variable.