I'm using rxvt-unicode as my terminal program. It has a TERM environment variable of 'rxvt-unicode'. My system has entries for that in termcap and terminfo. Everything is hunky-dory. When I ssh to another person's system, they don't have entries for that in termcap and terminfo. I'd like to add an entry in ~/.ssh/config that lets me set the TERM environment variable, but that's apparently not an option yet. My hackish solution is 'env TERM=xterm ssh somehost'. I can't see where TERM is defined as an environment variable that should be sent; it's not in ~/.ssh/config nor /etc/ssh/ssh_config. The man pages don't mention TERM; they explicitly say that no environment variables are sent (man ssh_config, look for SendEnv). 'Man slogin' says that some environment variables are set on the server side; but TERM isn't one of them. Thanks!
Yes, the $TERM supplied by the client takes precedence over any one set in ~/.ssh/config. On the other hand, you can set it in your shell's initialisation (.profile, .bash_profile) and also in ~/.ssh/environment (which does take precedence over the client-specified $TERM). .ssh/environment is documented in the sshd(8) manpage.
Mass update RESOLVED->CLOSED after release of openssh-5.1