This post is mostly for posterity, for those combing the internet for the solution to this obscure and frustrating problem with Cygwin. I spent hours trying to track this problem down, and the solution was really easy once I knew how to implement it.
For those of you who don’t know, Cygwin is a program that lets you do all kinds of neat stuff from the command line that you can’t do on the normal windows Command Line utility. Basically, it lets me use all the stuff I found really useful in Linux without having to switch away from Windows.
One of the things you can do with Cygwin is set up what’s called an SSH host, which lets you access your computer from another computer on the network in order to move files around, run programs, whatever. SSH is like a remote control for your computer. But recently, I discovered that my SSH host was broken. I tried everything I could think of to fix it. When I checked the logs, it gave me dozens of this message:
C:\cygwin\usr\sbin\sshd.exe (5448): *** proc magic mismatch detected – 0x704D1F7E/0xD94C588A.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version *should*
reside in x:\cygwin\bin, where ‘x’ is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
So I searched for cygwin1.dll, looking for extra copies lying around. I couldn’t find any with the Windows search. Rebooting didn’t help either. Worse, there was nothing on Google that helped me out. I was planning to uninstall Cygwin and reinstall it, which would have been a huge pain. Just before I did, though, I did one final search on Google.
Paydirt! Here is the solution. In the command line run:
cygcheck -s -v -r > cygcheck.out
grep cygwin1.dll cygcheck.out
This will give you a list of where Cygwin is finding the extra copies of cygwin1.dll. Remove all of them except for c:\cygwin\bin\cygwin1.dll.
Hopefully, that will help someone else who may be encountering the same problem I was.