Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 [192.168.1.106] port 22. <-- It takes a while
debug1: connect to address 192.168.1.106 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 http://superuser.com/questions/110160/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.

share|improve this question
    
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

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer
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
    
So does that mean you're going to accept the answer? –  Josh K Feb 20 '10 at 5:36
    
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, 10.0.40.177 and 192.168.1.106, 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:

10.x.x.x
192.168.x.x

... 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".

share|improve this answer
    
@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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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