SSH_CLIENT _not_ set when doing a command

Mark D. Baushke mdb at juniper.net
Sat Sep 30 03:31:45 EST 2000


On Fri, 29 Sep 2000 11:41:05 -0400, Michael Stone wrote:
>
>On Fri, Sep 29, 2000 at 08:25:25AM -0700, Mark D. Baushke wrote:
>> Looking at past sources, it appears that bash introduced the idea of
>> unexporting the SSH_CLIENT variable in version 2.02 (not a new feature
>> of version 2.04 as Mike suggested) and has been in each subsequent
>> release of bash.
>
>Did you actually check this? Yes, bash has tried to do stuff with ssh
>since 2.02. But the entry for changes between bash-2.04-devel and
>bash-2.03-release contains:
>t.  The SSH_CLIENT environment variable is no longer auto-exported.

I *thought* I had checked it. However, it helps if you recompile
the test program with the path to the older version of bash instead
of leaving it point to a new version. Clearly, I should not have
posted until after I was more fully awake.

Mike is absolutely correct. Neither 2.02 nor 2.03 exhibit the problems
with SSH_CLIENT at all.

However, adding an export SSH_CLIENT when appropriate
should allow Daniel to work around his problem.

    if [ "z$SSH_CLIENT" != "z" ]; then
        export SSH_CLIENT
    fi


>And certainly in my testing it affects 2.04 but *not* 2.03.

Yes, now that I have recompiled the test program, I get the same results.

	-- Mark





More information about the openssh-unix-dev mailing list