[2008.12] ssh instability

Joachim Ott jo.omsl at googlemail.com
Thu Jan 8 13:47:39 CET 2009


2009/1/8 Robin Paulson <robin.paulson at gmail.com>

> 2009/1/7 Joachim Ott <jo.omsl at googlemail.com>:
> > Does "ssh -v root at neo 2>ssh.log" give you a hint, when the error occurs?
>
> yeah, that hangs too, and writes nothing to the log file


Can you watch the network traffic too? Maybe the route isn't set properly?


> the phone itself doesn't hang, and i can run any apps as normal, but
> they won't download data - i tested tangogps, and it wouldn't get
> tiles
>
> so, i tried
>
> sudo ifdown usb0
> sudo ifup usb0
>
> and everything worked fine after that, so i figure it's the networking
> on the ubuntu side. any suggestions how to fix it?


This is my setup on the Desktop (Knoppix-Debian):

/etc/network/interfaces:
...
allow-hotplug usb0
iface usb0 inet static
        address 192.168.0.200
        netmask 255.255.255.0
        up route add -host 192.168.0.202 usb0
        up route del -net 192.168.0.0/24
        # up tcpdump -ni usb0 -w /tmp/usb0.log

allow-hotplug usb1
iface usb1 inet static
        address 192.168.0.201
        netmask 255.255.255.0
        up route add -host 192.168.0.203 usb1
        up route del -net 192.168.0.0/24

The iptables config, this is setup at boot time regardless whether a FR is
connected or not:

# Generated by iptables-save v1.3.6 on Tue Jul 22 16:31:52 2008
*filter
:INPUT ACCEPT [530942:703617921]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [337851:125732665]
-A FORWARD -i usb+ -o eth0 -j ACCEPT
-A FORWARD -i eth0 -o usb+ -m state --state RELATED,ESTABLISHED -j ACCEPT
COMMIT
# Completed on Tue Jul 22 16:31:52 2008
# Generated by iptables-save v1.3.6 on Tue Jul 22 16:31:52 2008
*mangle
:PREROUTING ACCEPT [531649:704109028]
:INPUT ACCEPT [530945:703618149]
:FORWARD ACCEPT [670:484698]
:OUTPUT ACCEPT [337854:125732893]
:POSTROUTING ACCEPT [338524:126217591]
COMMIT
# Completed on Tue Jul 22 16:31:52 2008
# Generated by iptables-save v1.3.6 on Tue Jul 22 16:31:52 2008
*nat
:PREROUTING ACCEPT [216:25311]
:POSTROUTING ACCEPT [9:588]
:OUTPUT ACCEPT [259:15994]
-A PREROUTING -i usb+ -p udp -m udp --dport 53 -j DNAT --to-destination
192.168.7.71
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Tue Jul 22 16:31:52 2008

And the /etc/network/interfaces on the first FR:
...
auto eth0
iface eth0 inet dhcp
        wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

auto usb0
iface usb0 inet static
        address 192.168.0.202
        netmask 255.255.255.0
        network 192.168.0.0
        gateway 192.168.0.200
        up route del default dev usb0
        # up echo "nameserver 192.168.0.200" >/etc/resolv.conf

Notice that I have the defaultroute to usb0 removed because I always use ssh
over wlan (much faster). I only use ssh over usb when I've mashed up the
wlan settings, and the login over usb it works without defaultroute too.
I think you need to keep that defaultroute and do the nameserver-setting.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmoko.org/pipermail/support/attachments/20090108/3145b3df/attachment.htm 


More information about the support mailing list