SSH to Mac using Android Phone I am trying to SSH into my Macbook Pro (10.6.8) using my Android phone. It is a SGH-T989 running the latest stable Cyanogenmod 10 (4.1.2).

I have enabled remote login on my Mac and confirmed I can SSH into it using another Macbook Pro (running 10.7.5). However, when I type "ssh user@ip" on my Android terminal, I get the following message after about 4-5 minutes of waiting.


  logossh: connect to host xxx.xxx.x.xxx port 22: Connection timed out


Any ideas why it works from another Macbook Pro but not from my Android phone? I also tried using connectbot but I get the same problem.

I never tried using WiFi while on CM10, but I just finished flashing and rooting stock touchwiz 4.1.2 (I missed the camera app and had terrible battery life on CM10). It connects fine when the phone is connected to the same wifi as the macbook pro but when I turn wifi off and use data, connectbot says:


  Connection Lost failed to connect to 192.168.1.106 (port 22): connect failed: ENETUNREACH (Network is unreachable)
You can't ssh from your phone to your Mac when using mobile data because you are no longer on the same network, and thus can't use the internal (RFC1918) address to reach it.

When you're using WiFi, it works because you are on the same network.

In order to reach your computer when using mobile data on your phone, you must do BOTH of:


ssh to your computer's public IP address; and
Forward port 22 from your home router to the computer you want it to reach.