Ssh – Cygwin, OpenSSH and Gitosis on Windows Server 2008

cygwingitsshwindows-server-2008

I spent serveral hours getting Cygwin, OpenSSH and Gitosis to work together on Windows Server 2008 x64 – unfortunately the tutorials on the web (from e.g. Shannon Cornish) don't seem to have an answer to my problem.

I get the following trying to login to my "git" user via SSH or trying to checkout the repository via "git clone git(at)localhost:gitosis-admin.git"

[main] sshd 9364 C:\cygwin\usr\sbin\sshd.exe: *** fatal error - could not load user32, Win32 error 1114 fatal: The remote end hung up unexpectedly

I found some hints that the I have to set serveral group policies regarding user tokens – but doing so didn't help either…

Best Answer

I've run into the same problem, both with Shannon Cornish's approach and with Tim Davis' approach. I'm still stuck.

Have you tried Tim Davis' approach as well? I've read on various cygwin-related sites that if the SSH daemon is running (indirectly) as a Windows administrator then this problem goes away. I'm running cygwin/sshd as a user who's in the admin group, so has full privileges to all files but I still get the same Win32 error 1114 as you.

Please post back if you've resolved the problem or if any of either of my pointers works for you.

Edit:

A Cygwin dev describes the relationship between cyg_server, Win32 errors, and Domain security. I haven't fully ruled this out as the cause but in my case I'm not trying to SSH using a Domain user so it sounds like it wouldn't be an issue.

Also, in case it helps: Mark Embling describing similar setup to Shannon's but continuing into more detail on Gitosis