Cygwin is “a large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows.” If you have to use Windows for something, it is a lifesaver!
After a recent surprise Windows 10 reboot, I noticed one of my scheduled SSH jobs failing with:
Bad owner or permissions on C:\\Users\\MY_USER/.ssh/config
…as though ~ or $HOME were being expanded as Windows paths (C:\Users\MY_USER) instead of Cygwin ones (/cygdrive/c/Users/MY_USER).
After a solid hour of fruitless Googling, it finally dawned on me that perhaps my system has been defiled with a non-Cygwin version of ssh. So I open a cmd prompt, and do this:
> where ssh C:\Windows\System32\OpenSSH\ssh.exe C:\cygwin64\bin\ssh.exe
Surprise, surprise—Microsoft’s own distro of OpenSSH… I guess that’s what I deserve for using Windows.
So far, the least invasive way I could think of to put that bullshit out of my misery was to remove it from the path:
- Open Run dialog by pressing Win+R.
- Open System Properties dialog by typing in sysdm.cpl into the Run dialog, then press OK.
- Go to the Advanced tab in the System Properties dialog.
- Push the Environment Variables… button at the bottom of the dialog tab.
- Scroll to the “Path” variable under the “System variables” group at the bottom of the dialog.
- Remove C:\Windows\System32\OpenSSH from your system-wide “Path” variable.
Of course, who knows if it will be added back to the path after the next windows update?