Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am sure I am missing something very obvious but cannot figure it out. I am trying to connect to my Ubuntu 12.10 machine via connectbot on my phone. In 12.04 this worked no problem, since I upgraded something is wrong (no route to host). What I have tried: allowing port 22 in UFW disabling UFW all together just in case (then later starting it back up) Connecting to my ssh server via localhost and ensuring that it is running

I can access my raspberry pi from the Ubuntu machine, and my phone (the raspberry pi does not see my ubuntu machine when trying to ssh from there as well), I am sure the problem is my Ubuntu machine doesn't show up on my network at all (when searching via nmap or Fing) and most likely it is terribly simple, the answer just escapes me.

I have searched around but most people having this problem or similar ones are trying to access from a windows machine or a mac, and none of the information there does me any good. A point in the right direction would be greatly appreciated!

Edit: The results from ip adress show on the ubuntu machine:
1: lo: mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: .eth0: mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
link/ether 1c:75:08:7f:9c:36 brd ff:ff:ff:ff:ff:ff
3: wlan0: mtu 1500 qdisc mq state UP qlen 1000 link/ether 7c:4f:b5:07:9b:bf brd ff:ff:ff:ff:ff:ff
inet 192.168.1.5/24 brd 192.168.1.255 scope global wlan0
inet6 fe80::7e4f:b5ff:fe07:9bbf/64 scope link
valid_lft forever preferred_lft forever
The results from ip route show, same machine:
default via 192.168.1.1 dev wlan0 proto static
169.254.0.0/16 dev wlan0 scope link metric 1000
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.5 metric 9

The results of ip address show from the raspberry pi:
1: lo: mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether b8:27:eb:30:d0:e4 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.11/24 brd 192.168.1.255 scope global eth0
inet6 fe80::ba27:ebff:fe30:d0e4/64 scope link
valid_lft forever preferred_lft forever
ip route show from pi:
default via 192.168.1.1 dev eth0 proto static
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.11

ip address show from android phone:
1: lo: mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ifb0: mtu 1500 qdisc noop state DOWN qlen 32
link/ether 52:60:12:6a:1a:f3 brd ff:ff:ff:ff:ff:ff
3: ifb1: mtu 1500 qdisc noop state DOWN qlen 32
link/ether ee:ae:5e:d4:46:58 brd ff:ff:ff:ff:ff:ff
4: usb0: mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 5e:34:a7:57:f6:6a brd ff:ff:ff:ff:ff:ff
5: qmi0: mtu 1428 qdisc pfifo_fast state DOWN qlen 1000
link/ether e6:8e:68:25:df:de brd ff:ff:ff:ff:ff:ff
6: qmi1: mtu 1428 qdisc pfifo_fast state DOWN qlen 1000
link/ether f2:c7:8f:3a:3f:97 brd ff:ff:ff:ff:ff:ff
7: qmi2: mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 1a:55:56:25:eb:a8 brd ff:ff:ff:ff:ff:ff
8: qmi3: mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 42:b9:3a:e5:2c:23 brd ff:ff:ff:ff:ff:ff
9: sit0: mtu 1480 qdisc noop state DOWN
link/sit 0.0.0.0 brd 0.0.0.0
10: ip6tnl0: mtu 1452 qdisc noop state DOWN
link/tunnel6 :: brd ::
11: usb1: mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
link/ether 02:21:00:1d:34:fb brd ff:ff:ff:ff:ff:ff
inet 192.168.157.1/29 brd 192.168.157.7 scope global usb1
inet6 fe80::21:ff:fe1d:34fb/64 scope link
valid_lft forever preferred_lft forever
12: mmi0: mtu 1428 qdisc pfifo_fast state DOWN qlen 1000
link/ether 02:21:00:1d:38:fb brd ff:ff:ff:ff:ff:ff
13: mmi1: mtu 1428 qdisc pfifo_fast master rmnet1 state UNKNOWN qlen 1000
link/ether 02:21:00:1d:3c:fb brd ff:ff:ff:ff:ff:ff
inet6 fe80::13:80a9:6e01/64 scope link
valid_lft forever preferred_lft forever
14: mmi2: mtu 1428 qdisc pfifo_fast state DOWN qlen 1000
link/ether 02:21:00:1d:40:fb brd ff:ff:ff:ff:ff:ff
15: mmi3: mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 02:21:00:1d:44:fb brd ff:ff:ff:ff:ff:ff
48: rmnet1: mtu 1428 qdisc noqueue state UP
link/ether 02:21:00:1d:3c:fb brd ff:ff:ff:ff:ff:ff
inet6 2600:1010:812b:d7ba::101/64 scope global
valid_lft forever preferred_lft forever
94: wlan0: mtu 1500 qdisc mq state UP qlen 1000
link/ether 3c:43:8e:66:ad:b7 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.6/24 brd 192.168.1.255 scope global wlan0
inet6 fe80::3e43:8eff:fe66:adb7/64 scope link
valid_lft forever preferred_lft forever
ip route show from android:
default via 192.168.1.1 dev wlan0
192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.6 metric 394
192.168.1.1 dev wlan0 scope link
192.168.157.0/29 dev usb1 proto kernel scope link src 192.168.157.1

yes I am using DHCP

And thank you all for taking time to help me with this, if nothing else I am becoming much more familiar with the environment I compute in daily!

Edit 2

Todays updates (1/9/13) seem to have solved the problem completely, shortly after I installed them I noticed my Ubuntu machine showing up on my phone, and also was able to connect via ssh from my phone, or any other device in the home. I looked through the installed updates and could not see anything that obviously would have solved the problem, but something did. I would be happy to post a list of what installed if that is useful in any way, also, if someone has the time, please advise as to how I should clean up this question, or if I should delete it all together since it appears an update solved the problem. Thanks again for all the help!

share|improve this question

closed as off-topic by guntbert, Jorge Castro, Eric Carvalho, Seth, Eliah Kagan Aug 26 '13 at 9:45

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This describes a problem that can't be reproduced that seemingly went away on its own or was only relevant to a very specific period of time. It's off-topic as it's unlikely to help future readers." – guntbert, Jorge Castro, Eric Carvalho, Seth, Eliah Kagan
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Hello, is the package openssh-server installed ? can you post the result of the command netstat -lnp |grep 22 ? Are you able to connect via ssh from the Ubuntu 12.10 machine to itself ? something like ssh localhost –  ricciocri Jan 5 '13 at 22:03
    
it is, and I have verified that it is working, I also tried switching to dropbear just in case, but that made no difference so I switched back to openssh –  jackson Jan 5 '13 at 22:04
    
I can connect via localhost, here are the results of netstat:"tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 647/sshd tcp6 0 0 :::22 :::* LISTEN 647/sshd unix 2 [ ACC ] STREAM LISTENING 17743 2279/chromium-brows /tmp/.org.chromium.Chromium.rpWK6g/SingletonSocket" –  jackson Jan 5 '13 at 22:07

2 Answers 2

Try to flush all your firewall rules with

sudo iptables -F

And verify that you have no more rules with

sudo iptables -L -n

After that re-try to conenct to your Ubuntu 12.10 from your phone

share|improve this answer
    
Flushing the firewall rules did not change anything, save the output from iptables -L -n now does show the rules have been flushed, still unable to connect from my phone or raspberry pi –  jackson Jan 5 '13 at 22:27
    
except it did kill my connection for some reason, was able to regain connectivity with sudo ufw disable. I am still unable to connect to the machine with other devices though –  jackson Jan 5 '13 at 22:27
    
What's the output of sudo iptables -L -n ? –  ricciocri Jan 5 '13 at 22:29
    
"Chain ufw-before-logging-forward (0 references) target prot opt source destination Chain ufw-before-logging-input (0 references) target prot opt source destination Chain ufw-before-logging-output (0 references) target prot opt source destination Chain ufw-before-output (0 references) target prot opt source destination Chain ufw-reject-forward (0 references) target prot opt source destination" over and over again –  jackson Jan 5 '13 at 22:31
    
sorry, I suppose I need to figure out how to keep the formatting when I submit. –  jackson Jan 5 '13 at 22:32

When connectbot says "no route to host" that means you are trying to access a wrong IP address.

  1. check in your ubuntu what IP address it uses (ip ad in terminal is a great command for that)
  2. try to access your system with connectbot via that address
  3. then solve any Name issues (if there are any)

EDIT 1:
It seems that you may have no network connection at all - for a verification do the following:

  • on ubuntu type ip link show (should show eth0 UP)
  • from one of the other devices issue ping 192.168.1.5

EDIT 2:
Now we need still more info from you (I suspect mismatching network masks). Please post (by editing your question) the IP configurations of all 3 devices and tell us if you are using DHCP in your network.

You can get that config data with ip address show and ip route show.

share|improve this answer
    
My machines ip is 192.168.1.5, which is what I direct connectbot to (hostname@192.168.1.5) it fails every time. I don't have a complex or crazy network setup, and I think the problem is related to the fact that the ubuntu machine is not visible to any device on the network (nmap and fing do not see it) –  jackson Jan 5 '13 at 22:10
    
also, just to clarify, my phone is connected to my home network when I try (not 4g), and the problem is consistent if I try to connect from my raspberry pi (running raspbian) which is also on the same network –  jackson Jan 5 '13 at 22:11
    
Not visible, could only means firewall blocking the ports. can you verify that you have no firewall with sudo iptables -L -n and if it's up, try disable it with the command iptables -f –  ricciocri Jan 5 '13 at 22:12
    
-f doesn't seem to be a valid command? I had tried disabling UFW, which I thought was a front end for iptables, but I am not sure of that or why I thought that. –  jackson Jan 5 '13 at 22:16
    
see my edited answer please –  guntbert Jan 5 '13 at 22:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.