The idea is to get rid of the CYGWIN warning given when one connects to the cygwin deamon running as a service in the windows box (sshd):
Problematic case:
> ssh -i <my private key> me@server "ls d://path//to//folder//"
cygwin warning:
MS-DOS style path detected: d://path//to//folder//
Preferred POSIX equivalent is: /cygdrive/d/path/to/folder/
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
[...]
This warning can cause a remote command executed to return a warning instead of '0' status code.
The warning tells us to set the following value in the CYGWIN environment variable: "nodosfilewarning"
The problem is that wether one sets it in any the following places, it does not get into the remote environment:
- Windows user environment variables
- Windows System environment variables
- ~/.bashrc
- ~/.profile
- /etc/bashrc
- /etc/profile etc.
Test case:
> ssh -i <my private key> me@server "env | grep CYGWIN"
CYGWIN=CYGWIN sshd
The CYGWIN environment variable never contains the proper value regardless of where you set it...