Make sure that AcceptEnv is set in sshd_config
Use consistent stderr 2 stdout redirects in grep checks.