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

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:

  1. Open Run dialog by pressing Win+R.
  2. Open System Properties dialog by typing in sysdm.cpl into the Run dialog, then press OK.
  3. Go to the Advanced tab in the System Properties dialog.
  4. Push the Environment Variables… button at the bottom of the dialog tab.
  5. Scroll to the “Path” variable under the “System variables” group at the bottom of the dialog.
  6. 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?

← Older Newer →

Comments are closed.