I use this setting in
Host server Hostname 192.168.x.x SetEnv TERM=xterm
But when logging in to the server and doing
echo $TERM, I get
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
.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).