I'm trying to setup a git repository on an existing Windows 2008 (R2) server. I have successfully installed Cygwin & added git and ssh to the packages, and everything works perfectly (thanks to Mark for his article on it).
I can ssh to localhost on the server, and I can do git operations locally on the server. When I try to do either from the client, however, I get the "port 22, Bad file number" error. Detailed SSH output is limited to this:
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Connecting to {myserver} [{myserver}] port 22.
debug1: connect to address {myserver} port 22: Attempt to connect timed out without establishing
a connection
ssh: connect to host {myserver} port 22: Bad file number
Google tells me that this means I'm being blocked, usually, by a firewall. So, double-checked the firewall settings on the server, rule is there allowing port 22 traffic. I even tried turning off the firewall briefly, no change in behavior. I can ssh just fine from that client to other servers. The hosting company swears that there's no other firewalls blocking that server on port 22 (or any other port, they claim, but I find that hard to believe). I have another trouble ticket into them, just in case the first support person was full of it, but meanwhile I wanted to see if anyone could think of anything else it can be.
Thanks, Paul
Windows Firewall on 2008 has three different profiles: private, public, and domain. Not sure if your server's on a domain, but I'd add an exception -- if you haven't already done so -- to the private, domain and public profiles in the firewall.
OK, well, turns out the first person I talked to at the hosting company was incorrect. The problem was, in fact, that they block port 22 by default to the section of their network that has Windows servers. I've applied for an exception to that policy.
Paul