This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Missing APPDATA var in env of ssh sessions?
On 8/11/2010 4:01 AM, Corinna Vinschen wrote:
> On Aug 11 00:23, Charles Wilson wrote:
>> Can ssh (or is it cygwin1.dll?) ensure that the user's APPDATA variable
>> is populated, since it appears to be a pretty important var for Windows
>> Vista+?
>
> In `man sshd' see the LOGIN PROCESS and SSHRC sections, as well as the
> AUTHORIZED_KEYS FILE FORMAT section.
>
> In `man sshd_config' see the descriptions for AcceptEnv and
> PermitUserEnvironment.
Thanks. I was able to get the desired behavior by;
1) adding 'PermitUserEnvironment yes' to /etc/sshd_config
2) restarting sshd, and
3) Adding a new file, ~/.ssh/environment, with the following content
APPDATA=C:\Users\me\AppData\Roaming
Then, logging in via ssh, the new environment has the correct value, and
"mingw-get" doesn't litter my CWD with %APPDATA% directories.
I was thinking this facility might be made the default via updates to
ssh-user-config and ssh-host-config, but 'PermitUserEnvironment' carries
a pretty severe warning in 'man sshd_config', so probably not.
Those affected will probably find this thread, and the solution, for
themselves.
--
Chuck
--
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