Macos – Operation timed out error when trying to SSH into local machine

macosport-forwardingssh

I'm trying to set up SSH into my local Mac. I have taken the following steps:

  1. Enabled remote login on the Mac
  2. Verified I can ssh from my local Mac into my local Mac
  3. Verified I can ssh from another computer on the local network into my Mac
  4. Created a custom application forwarding port 22 traffic to my Mac (following the instructions for my 2Wire router found here)
  5. Verified that port 22 is open on the external IP address using an online port scanner
  6. Set up DynDNS to map myusername.dyndns.org to my dynamic IP address and installed the software on the local Mac.

However, when I try to SSH in using the external IP address, I get the following error:

17> ssh XXX.XXX.XXX.XXX -l kevin -v
OpenSSH_5.8p1, OpenSSL 1.0.0d 8 Feb 2011
debug1: Reading configuration data /Users/kevin/.ssh/config
debug1: Reading configuration data /opt/local/etc/ssh/ssh_config
debug1: Connecting to XXX.XXX.XXX.XXX [XXX.XXX.XXX.XXX] port 22.
debug1: connect to address XXX.XXX.XXX.XXX port 22: Operation timed out
ssh: connect to host XXX.XXX.XXX.XXX port 22: Operation timed out 

Can you help me figure out what the problem is or how to debug it? I'm at a loss and I don't know how to log incoming traffic, or figure out where the connection is being dropped.

Best Answer

I solved the problem. Everything was working fine except I was trying to ssh in from a different computer on the local network, while using the external IP. This attempt was blocked (I am not sure why).

Attempting to SSH in from an external network worked perfectly.

Related Question