PROGRAMFILES variable is not set during openssh session

Cyrille Lefevre cyrille.lefevre-lists@laposte.net
Sun Feb 12 22:21:00 GMT 2012


Le 12/02/2012 17:33, ArcFi a écrit :
> PROGRAMFILES variable is not set during openssh session.
> This is very important for remote administrative tasks.
>
> admin@srv06 ~
> $ echo $COMPUTERNAME,$PROGRAMFILES,$USERPROFILE,$SYSTEMDRIVE
> SRV06,C:\Program Files,C:\Documents and Settings\admin,C:
>
> admin@srv06 ~
> $ ssh localhost 'echo $COMPUTERNAME,$PROGRAMFILES,$USERPROFILE,
> $SYSTEMDRIVE'
> admin@localhost's password:
> SRV06,,,C:
>

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

since then, I use the attached script in /etc/profile.d to set the 
missing ones at connection time...

you may comment the lines containing SECONDS.

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

PS : Corinna, maybe this may be made a FAQ ?

Cyrille Lefevre
-- 
mailto:Cyrille.Lefevre-lists@laposte.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ssh-session-env.sh
Type: application/x-shellscript
Size: 2681 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20120212/d92ad3a7/attachment.bin>
-------------- 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