environment variables in ssh non-interactive shell
Mon Nov 12 18:04:00 GMT 2012
On 11/12/2012 7:10 AM, Ariel Sommeria wrote:
> I'm trying to use environment variables to pilot a windows system
> through cygwin+ssh. Things work nicely with an interactive shell, but
> mess up with a non-interactive shell because my environment variables
> aren't set.
> I've set PermitUserEnvironment to yes in my sshd_config, I've set
> BLA=bla in .ssh/environment. Now when in my script I call 'env', I do
> see BLA in it. However echo $BLA doesn't echo anything.
> The only similar issue and suggestion I've found is this:
> Obviously I use the environment file, but it doesn't help.
> Does anyone have an idea what could be wrong?
I wonder whether you *exported* the variables in question.
will put the setting in your environment, but does not automatically
add it to the environment of things you invoke. For that to happen,
you need to say:
(or have 'set =a' active in bash).
Regards -- Eliot Moss
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin