Ssh – Cygwin sshd service starts but only produces errors

cygwinsshwindows-xp

I know this has been asked before, but I looked at the other questions and they didn't help, so here goes…

I installed cygwin (only OpenSSH and whatever else it automatically chose for it). I ran the ssh-host-config and entered 'yes' for everything (basically a manual ssh-host-config -y).

It installed the service.

However, everytime the service starts, I get the following in the /var/log/sshd.log:

    158 [unknown (0xED4)] ? 2672 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
Exception: STATUS_ACCESS_VIOLATION at eip=7C919AF2
eax=00000000 ebx=00000000 ecx=000007B4 edx=77FEE0C0 esi=77FEE0B0 edi=00000000
ebp=0022EE94 esp=0022EE20 program=
cs=001B ds=0023 es=0023 fs=003B gs=0000 ss=0023
Stack trace:
Frame     Function  Args
0022EE94  7C919AF2  (00FEE0B0, 77FE25EE, 77FEE0B0, 7C90DCAE)
0022EECC  7C901046  (00261E90, 0022F094, 00000000, 00000000)
0022EEE4  77FE25A8  (0022EFF4, 0022F094, 0022EF50, 0022EF50)
0022EFF8  77FE1D0F  (00010002, 0022F014, 00261E90, 0022F094)
0022F01C  77FE1CB9  (00010002, 00261E90, 0022F094, 00000000)
0022F04C  77FE1E37  (00010002, 0022F0C8, 0022F094, 0022F1F0)
0022F060  77DE54D9  (0022F0C8, 0022F094, 00002000, 7C809B59)
0022F1F0  6108E202  (61600088, 00000003, 00020902, 00060000)
0022F220  6106E7C7  (0A000000, 00000003, 0022F24C, 0000B808)
0022F250  6106E872  (610CFE20, 610048AA, 7C980620, 7C8021B9)
0022F2A0  61004FF5  (610CFEE0, FFFFFFFE, 000007E4, 610CFE04)
0022F2F0  610052ED  (10003390, 10003390, 003620B0, 10000000)
0022F310  61007F9D  (10000000, 10003390, 7C91BF81, 10000240)
0022F330  100018A8  (10000000, 00000001, 00000000, 100017F0)
0022F350  7C90118A  (100017F0, 10000000, 00000001, 00000000)
0022F458  7C91B5D2  (00000000, C0150008, 00000000, 00000000)
End of stack trace (more stack frames may be present)  
  93485 [unknown (0xED4)] ? 2672 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
  94005 [unknown (0xED4)] ? 2672 handle_exceptions: Error while dumping state (probably corrupted stack)
  94706 [unknown (0xED4)] ? 2672 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
  95283 [unknown (0xED4)] ? 2672 handle_exceptions: Error while dumping state (probably corrupted stack)
  95985 [unknown (0xED4)] ? 2672 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
  96528 [unknown (0xED4)] ? 2672 handle_exceptions: Error while dumping state (probably corrupted stack)
  97223 [unknown (0xED4)] ? 2672 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
  97809 [unknown (0xED4)] ? 2672 handle_exceptions: Error while dumping state (probably corrupted stack)
  98540 [unknown (0xED4)] ? 2672 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
  99102 [unknown (0xED4)] ? 2672 handle_exceptions: Error while dumping state (probably corrupted stack)
  99823 [unknown (0xED4)] ? 2672 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
 100374 [unknown (0xED4)] ? 2672 handle_exceptions: Error while dumping state (probably corrupted stack)
 101105 [unknown (0xED4)] ? 2672 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION
 101661 [unknown (0xED4)] ? 2672 handle_exceptions: Error while dumping state (probably corrupted stack)

And this goes on for as long as the service is running. I cannot connect to the machine.

However, if I run /usr/sbin/sshd manually, it starts fine, and I can connect to the machine.

The machine:

  • Windows XP Pro
  • Firewall – disabled
  • Account: admin

Stuff I've already tried:

  • Removing everything cygwin and reinstalling (registry keys included)
  • Restarting the computer (multiple times)
  • Installing cygwin in safe mode as suggested here
  • Giving SYSTEM "Full Control" to the Cygwin folders, as suggested here

Any help is greatly appreciated!

Best Answer

Found the problem, in case anyone else has the same issue:

There were two versions of 'cygwin1.dll' on the system. It was looking at the wrong one. If you have this issue, search for the file, and remove one of them (depending on which version you are keeping).