How to SSH into Android from a different network? I'm running SSHDroid on my unrooted android device. When my SSH client on ubuntu or windows are on same wifi network as the Android, I'm able to connect to it via SSH. 

But what I want to do is, connect to the device via SSH from a client like putty etc. from a computer which is not in the same network.

eg. If i'm on the same wifi network, I can connect via SSH using command


  $ ssh root@192.168.1.3 -p 2222  


but when I connect via ssh using external IP, it says connection refused.


  $ ssh root@112.79.41.234 -p 2222


I also tried using PortForward to forward external port to the internal one. But it doesn't seem to work. 
Can anyone tell me how to do it without rooting the device.?
Quick answer:

You don't need to 'root' your Android phone - both it and SSH are working correctly.



How to solve problem:

You need to better understand 'port forwarding' and 'public IP addresses'.

The 'port-forwarding' needs to occur where the public network ('Internet') meets the private network (WiFi network with Android device).  This is usually a 'router', but could be a larger 'firewall'.

You need to find out and add this detail, if you want any further help ..