I installed sshd on my cygwin, and I tested it on the local machine which works fine.

  • sh-host-config -y
  • cygrunsrv -S sshd

But when I try to login from my Mac, I can't login to the cygwin. The debugging message is as follows.

OpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to smchopc [] port 22. <-- It takes a while
debug1: connect to address port 22: Operation timed out
ssh: connect to host smchopc port 22: Operation timed out

What might be wrong?

PS: Actually I have another question list of SSH to Cygwin is slow to respond , and in this case, the connection is very slow both for local connection and external connection. With the question for this thread, the local connection is very fast and working whereas external connection is not possible.

Both are the same Windows 7, and I installed the same cygwin. I don't understand what makes this difference.

  • When you say "try to install from my Mac" what do you mean? You're trying to ssh into your local machine? I'm assuming you're on a local network with the machine. – Josh K Feb 19 '10 at 4:45
  • Oh, I changed it from 'install' to 'login', sorry about the confusion. – prosseek Feb 19 '10 at 16:29

You could have a firewall blocking port 22. Run a port scan on the machine you're trying to use and see if it's open.

  • 1
    Yes, you are correct. With the help in maximumpcguides.com/windows-7/… I could make it work. Thank you! – prosseek Feb 20 '10 at 1:20
  • Yes, absolutely, actually, I even didn't know about the 'acceptance' of answer system. Thanks again. – prosseek Feb 20 '10 at 17:22

In both this question and that other, your logs show private IP addresses. However, the addresses, and, are in different ranges, so I assume you're mixing multiple routers? (Like maybe a wired router and a wireless router?)

If so, then you might be suffering from Double-NAT problems then. I'm not sure if SSH would be affected by that. But as a start: for an AirPort router, Apple describes how to validate and fix that in some support article:

here is a simple way to tell if your computer is on a "double NAT" network:

  1. In Finder, from the Go menu, choose Utilities.
  2. Open Network Utility.
  3. Click Traceroute.
  4. In the field, enter "www.mac.com".
  5. Click Trace.

After starting the trace, look for the line beginning with the number 2.

If the address in that line is any IP address in either of the following ranges:


... then your network has multiple layers of NAT.

Like described in that same support article: to fix this, you would need to put the "slave" router (most often the wireless router) into "bridging mode".

  • @Arjan: Actually, one Win7 machine is my home PC, and the other one is for my office work. After fixing the not-login problem with port 22 open, I see the login speed is not bad, even though it's not an instant login. – prosseek Feb 20 '10 at 1:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.