Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 -vv -sP

Starting Nmap 5.21 ( ) at 2012-12-30 23:05 CET
Initiating Ping Scan at 23:05
Scanning [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 (
Host is up (0.0034s latency).
Nmap done: 1 IP address (1 host up) scanned in 0.01 seconds
share|improve this question
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
how do you connect over the computer name or the ip of the Mac? – konqui Jan 22 '14 at 18:08

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 22

Connected to macbook
Escape character is '^]'.

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

Do you see the SSH header? then sshd is available


ssh -v -l $USERNAME

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

share|improve this answer

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .