– Make sure that the setting AcceptEnv is not set in /etc/ssh/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 environment 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 reasoon, care should be taken in the use of this directive. The default is not to accept any environment variables.
eg.
AcceptEnv=LC_ALL LC_LANG
Preventing variable change by user:
in /etc/profile
readonly VARIABLENAME[=VALUE]