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 want to open a connection to my mac (10.8) via SSH. An SSH-server is installed by default on OSX. Remote login is enabled, so the service is running and I can connect to to localhost via ssh.

enter image description here

The firewall is enabled, and the port for SSH is open. If I connect from another computer on the same local network, I get a connection timeout.

enter image description here

What am I missing here?


NMAP Test

>> nmap -vv -sP 192.168.1.22

Starting Nmap 5.21 ( http://nmap.org ) at 2012-12-30 23:05 CET
Initiating Ping Scan at 23:05
Scanning 192.168.1.22 [2 ports]
Completed Ping Scan at 23:05, 0.00s elapsed (1 total hosts)
Initiating Parallel DNS resolution of 1 host. at 23:05
Completed Parallel DNS resolution of 1 host. at 23:05, 0.00s elapsed
Nmap scan report for macbook (192.168.1.22)
Host is up (0.0034s latency).
Nmap done: 1 IP address (1 host up) scanned in 0.01 seconds
share|improve this question
1  
How do you connect to the internet? Specifically, are you behind a router? –  Dennis Dec 30 '12 at 12:55
    
Both computers are connected to the same router, the mac via wifi. It has worked before, and I can connect from the mac to the other computer using SSH. –  SPRBRN Dec 30 '12 at 16:23
    
Try making the two computers listen to different ports. You can add a listening port by adding the line Listen PORTNUMBER to /etc/ssh/sshd_config. –  Dennis Dec 30 '12 at 16:44
    
To help diagnose try to nmap to your mac from another computer on the same local network. You should see port 22 open (or whatever you have set it to if you have changed it per Dennis' suggestion above) –  sdjuan Dec 30 '12 at 17:25
1  
how do you connect over the computer name or the ip of the Mac? –  konqui Jan 22 at 18:08
show 7 more comments

2 Answers

Verify the listening socket:

netstat -an|grep LISTEN|grep 22
tcp6       0      0  *.22                   *.*                    LISTEN     
tcp4       0      0  *.22                   *.*                    LISTEN     

Then try a plain connect from another machine on the same subnet i.e. telnet 192.168.1.22 22

Trying  192.168.1.22...
Connected to macbook
Escape character is '^]'.
SSH-2.0-OpenSSH_5.9

Do you see the line with 'Escape character'? then the port is visible.

Do you see the SSH header? then sshd is available

Try

ssh -v 192.168.1.22 -l $USERNAME

You configured for specific users, that would not cause a time-out for other users.

share|improve this answer
add comment

I had the same problem. I solved it by enabling the option "sshd-keygen-wrapper" in my firewall. I hope this helps.

share|improve this answer
add comment

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.