I am trying to access a storage space we have at work via ssh but I get a timeout every single time (Mac OS 10.7.5 - Terminal).

I checked firewalls, settings, even turned off Little Snitch, and port 22 is nowhere blocked. Doing the exact same request on a Windows machine with a SSH client works like a charm.


ssh login_name@server_address


ssh: connect to host server_address port 22: Operation timed out

The problem seems to come from my company's vpn/proxy settings. Will update if I find a way around it.

  • 1
    Does it work if you shut your firewall down? I know you checked settings, but it does not say if you checked it with firewall off – Rob Mar 21 '13 at 19:55
  • Yes, sorry for not being clear, I did check with the firewall off as well ! – Anas Mar 21 '13 at 21:07
  • I'm thinking of a routing issue... Is it possible to set your Mac to use the Windows computer's IP address and try to ssh from your Mac? Is the IP address configured with DHCP? Could you add the output of netstat -rn to your question (you may not want to make all IP addresses public here at AskDifferent, in that case replace them with a.b.c.d but be consistent so that the same IP address always gets the same a.b.c.d replacement)? Is your Mac in the same network as your storage device? – jaume Mar 21 '13 at 21:45
  • Did you finally understand and fixed this ssh blocked? – dan Jul 30 '15 at 9:41
  • @Anas: you wrote in a comment that the problem was the same on your colleague's laptop. Was this wrong? What is the difference between you Mac and Windows client? What does a basic ping give on the 2 ones? – dan Aug 9 '16 at 14:51

3 commands may help you to track down this protocol failure:

ping server_address
traceroute server_address
ssh -v login_name@server_address

Please check that you are connecting to your targeted server with the right network interface. If you are using the infamous Automatic location you might be networking the wrong way (for example through the neighbour free wi-Fi when you thought you were using your company VPN).

If you suspect a legitimate or accidental filtering, you will be able to diagnose it with:

nmap -Pn -p22 server_address
  • Hi daniel, thank you very much for your answer. Unfortunately I just realized that it might be a problem with my company's server settings and proxies, as it doesn't work on my colleague's laptop either. Will let you know if it's not ! Thank you ! – Anas Mar 25 '13 at 18:30
  • From another comment, this laptop is also a Mac. – dan Aug 9 '16 at 15:10
  • @daniel Azuelos Is -Pn necessary for nmap? What difference would it make? – DKroot Jul 25 '17 at 18:01
  • zsh: command not found: nmap – Jamie Hutber Mar 12 '18 at 15:53
  • @JamieHutber which version of MacOS X? echo ${PATH}? [return] In fact I think you should make a question about your problem which isn't an ssh timeout one. – dan Mar 13 '18 at 20:29

This occurred for me immediately after installing an updated version of OS X. Before you dig too deep into changing network settings I suggest doing an additional restart. This corrected the issue for me.


I was able to fix this by changing my DNS settings from the default ISP supplied ones to different ones (in this case,

  • 1
    How does changing a public DNS server to another public DNS server fix a problem that’s localized (“here at work”, per the OP) to an internal network? – Allan May 10 '20 at 3:32
  • Exactly what I'm wondering as well. But no other variables were changed so it's odd. – 0x00ff May 11 '20 at 4:18
  • My ISP does some very sketchy and restrictive stuff when it comes to routing my traffic. – 0x00ff May 11 '20 at 4:27

You must log in to answer this question.

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