1.7.5: sshd environment variables

Cyrille Lefevre cyrille.lefevre-lists@laposte.net
Thu May 20 01:10:00 GMT 2010


Le 03/05/2010 02:40, Larry Hall (Cygwin) a écrit :
>
> On 5/2/2010 2:33 AM, Vincent Pelletier wrote:
>> Le dimanche 02 mai 2010 02:52:55, Larry Hall (Cygwin) a écrit :
>>> You can add whatever variables you want and need to a script you can run
>>> as part of the login or just after, depending on your needs.
>>
>> So my question becomes:
>> Is it possible to get windows environment vars in a shell obtained via
>> ssh
>> (to avoid duplicating their definition in my .bashrc) ? Or is there a
>> way to
>> extend the set of vars sshd lets through to shell (I'm ok with having
>> to name
>> the variables I need, as long as I don't have to set their value
>> manually) ?
>
> You can get the environment variables using 'env' (or 'set' in 'cmd.exe')
> prior to invoking 'ssh'. You can then trim down the list to those that
> you want. Putting those in a file that you can invoke shouldn't be hard.

around february 19, there was a discussion about to limit ssh 
environment variables not including some windows ones !

since then, I use the following script to set the missing ones at 
connection time...

you may comment the lines containing SECONDS.

it based on Kurt Franke's similar script in the idea.

Regards,

Cyrille Lefevre
-- 
mailto:Cyrille.Lefevre-lists@laposte.net
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ssh-session-env.sh
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100520/216d9383/attachment.ksh>
-------------- next part --------------
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list