Conflicting TERM env var with SetEnv feature.

Raphael Medaer rme at escaux.com
Sat Nov 17 01:02:15 AEDT 2018


> I'm not sure that it's wrong to allow an exant environment variable to
> override a configuration setenv directive.  It's a little like the "-o"
> options can also override configuration directives.

Actually if you use "-o" it's also overridden. Looking at sshd
logging, it seems that the env var is overridden because of session
mechanism (aka "not ordering of parameter source").
Thus is it a non-issue due to priority of configuration source ? Does
it mean that the priority is "env var" > "cmd line arguments" >
"configuration directive" ?

If I well understand the logs, I assume it's a bug. Take a look at
this line "sshd[35546]: debug2: Setting env 1: TERM=xterm-256color".
It proves that sshd try to set the env var.

By the way, I'm pretty sure that "SetEnv" (via argument with "-o
SetEnv..." or via the configuration file) should override your local
(aka client) environment variables.

Kind regards,


More information about the openssh-unix-dev mailing list