I have a really weird issue with connecting to an outside host from my android device (2.3.6) using ssh. I have no problem with connectbot actually, but when working on a terminal the weirdness kicks in. I've tried several solutions (terminal-ide, rsync4android, kbox) and the symptoms are all the same.

If I'm connected to the net through the broadband link everything works find, host resolution, ssh, etc.

However if I'm connected through my home wifi router host resolution doesn't work and neither does ssh (connectbot still works over wifi, but none of the terminal based solutions). It simply hangs when I do "ssh host.com" or "ssh x.y.z.v" so it doesn't matter if I use IP numbers or the domain name.

I thought this has to do with the firewall setup on my wifi router, but on my laptop everything is working without a problem, I can ssh to any host, etc, and on the laptop the connection is also through the wifi router.

So to summarize this is situation:

  1. connectbot on device: works with both wifi and broadband
  2. terminal/ssh on device: only works with broadband
  3. terminal/ssh on laptop: works with wifi

I should add that ping, wget, netcat, etc. all work from the terminal to the outside host also on wifi so the problem is ssh-specific.

What can be the reason? Any hints would be greatly appreciated.

Unfortunately strace or the -v and -vv options for the ssh client are not available on android, so I'm really at a loss how to debug this.

In case you are interested why I don't simply use connectbot and forget about the terminals: I'd like to use rsync eventually which would operate over ssh.

  • can you ping the hosts by numeric IP addresses (within your wifi network) from within the terminal on your device? If yes, then can you ping to outside hosts on the terminal? – t0mm13b Mar 31 '13 at 20:57
  • Yes, I can ping all hosts from the terminal. Also, the outside host which runs the ssh server also runs a web server and I can fetch any content with wget. So the problem is really ssh-specific. – DanielFetchinson Mar 31 '13 at 21:15
  • What does the log say when performing ssh....? Is it authentication, no ssh keys...? More information? :) – t0mm13b Mar 31 '13 at 21:58
  • It just hangs, there is no output at all. And since there is no strace I don't know how to find out what the problem is. – DanielFetchinson Apr 1 '13 at 13:03
  • use ssh -v for verbose output, add an extra v to the switch for more verbose output. – t0mm13b Apr 1 '13 at 14:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.