John Owens wrote: > When I log into a bash shell (as me) remotely through sshd, many variables are > NOT visible. What's even weirder is that some are and some are not. So for > instance, "PROCESSOR_LEVEL" and "PROCESSOR_IDENTIFIER" and "PATHEXT" are > visible, but other variables (the ones I define, in general) are not. > > How can I make my system environment variables appear when I ssh through sshd?
I believe this is because the ssh daemon starts out with an empty environment for the child and then only populates it with a list of certain known variables. This is a security measure to prevent data leaking from the privileged daemon process to the untrused user process. The solution is to set the variables in the traditional *nix way, by setting them in the appropriate rc file such as /etc/profile or the user's ~/.profile. Ssh also has a mechanism for allowing the connecting user to specify environment variables to be set; see "man sshd" and "man sshd_config" for details. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/