Setting variable in /etc/environment has no effect for ssh session

Yu, Mingli mingli.yu at eng.windriver.com
Thu Apr 17 16:07:46 AEST 2025


Hi Expert,

I'm using openssh 9.9p2 and have defined the below logic into 
/etc/pam.d/sshd.
session required pam_env.so

But the environment variables defined in /etc/environment file are not 
effective when login via ssh. Could you help to guide what's wrong here?



Thanks!


More information about the openssh-unix-dev mailing list