Veja man ssh_config:
SendEnv
Specifies what variables from the local environ(7) should be sent
to the server. Note that environment passing is only supported
for protocol 2. The server must also support it, and the server
must be configured to accept these environment variables. Refer
to AcceptEnv in sshd_config(5) for how to configure the server.
Variables are specified by name, which may contain wildcard char‐
acters. Multiple environment variables may be separated by
whitespace or spread across multiple SendEnv directives. The
default is not to send any environment variables.
e man sshd_config:
AcceptEnv
Specifies what environment variables sent by the client will be
copied into the session's environ(7). See SendEnv in
ssh_config(5) for how to configure the client. Note that envi-
ronment passing is only supported for protocol 2. Variables are
specified by name, which may contain the wildcard characters `*'
and `?'. Multiple environment variables may be separated by
whitespace or spread across multiple AcceptEnv directives. Be
warned that some environment variables could be used to bypass
restricted user environments. For this reason, care should be
taken in the use of this directive. The default is not to accept
any environment variables.
De acordo com isso, o padrão deve ser não enviar nenhuma variável, mas TERM parece ser especial. É enviar de qualquer maneira.
Portanto, você pode alterar o TERM ao chamar ssh (como TERM=xterm ssh ...
), alterá-lo após o login (como em .bash_profile
) ou definir o tipo de TERM desconhecido no lado do servidor (supondo que você tenha acesso root lá). Veja outra resposta para detalhes.
infocmp
etic
, uma vez compilado, não há necessidade de alterar temporariamente$TERM
novamente. a propósito, eu apenas copiei (rsync)/usr/share/terminfo/s/screen-256color
do Fedora 18 para o CentOS, parece que funciona bem (rsync -tv /usr/share/terminfo/s/screen-256color root@the_host:/usr/share/terminfo/s
).