I use this setting in ~/.ssh/config
:
Host server
Hostname 192.168.x.x
SetEnv TERM=xterm
But when logging in to the server and doing echo $TERM
, I get xterm-256color
.
How to set TERM from ssh client config file?
What is curious: when connecting as TERM=xterm ssh server
, echo $TERM
on server gives xterm
. Although this shows that the setting can be transmitted, it does not solve the problem, because I need to set it in config file. Also, putting TERM=xterm
in .ssh/environment
on server sets it, but it does not solve the problem either, because I cannot edit anything on server.
alias ssh='env TERM=xterm ssh'
in my .bashrc. I know it's a hack, but it's good enough for my purpose (i.e. st-256color not being recognized by older hosts).