maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   ssh to N900 fails (https://talk.maemo.org/showthread.php?t=43638)

Crotch 2010-02-08 12:17

Re: ssh to N900 fails
 
I have a similar problem that I can "work" around.

The first couple of times I try to ssh over wireless I get the same message as joschum. However, I try to connect several times. After about 5 times it connects and works flawlessly.

kwotski 2010-02-08 12:28

Re: ssh to N900 fails
 
It seems quite odd, because for both wlan interfaces, the subnet is correct and there is traffic both ways.

So, on the N900:

inet addr:192.168.254.219
Mask:255.255.255.0
RX bytes:510308 (498.3 KiB) TX bytes:166707 (162.7 KiB)

(though the traffic is rather low here)

and on the laptop:

inet addr:192.168.254.222
Mask:255.255.255.0
RX bytes:23174401 (23.1 MB) TX bytes:5773662 (5.7 MB)


These are definitely correctly configured at the interface level.

I've occasionally had an issue ssh-ing into the N900 where the N900's lan interface needs to be "woken up" by initiating some traffic from the device itself.

"No route to host" might be a connect timeout, if the wlan interface on the N900 has gone to sleep (the message might take a while to appear if this is the case.)

I would first make sure there's no interference from iptables on the laptop by turning iptables off temporarily, then make sure the interfaces and routing are as described previously on both machines, then try pinging the laptop IP from the N900, and if you get replies, try to ssh to the N900 from the laptop again.

If that doesn't work, might be best to post your laptop routing table, though from looking at the ifconfig output it seems it would be correct.

mece 2010-02-08 12:33

Re: ssh to N900 fails
 
Wow, all sorts of complicated stuff in this thread. Pinging the computer from the N900 works for me when I get that. I think it has to do with power saving

flya320 2010-02-08 12:53

Re: ssh to N900 fails
 
Quote:

Originally Posted by joschum (Post 516053)
Yes, usb0 seems to be disconnected but ssh to the N900 via wireless by
ssh root@192.168.254.219
should work since both the laptop and the N900 are in the same subnet. I also moved the N900 close to the access point but it doesn`t work. ssh from the N900 to another computer works.
Any ideas?

Have a look at the routing table of your laptop, I still think it is a routing problem.

Are you able to ping the n990 from laptop?
Are you able to ping laptop from n900?

Are you able to ssh from n900 to laptop?

What does telnet 192.168.254.219 22 give you?

joschum 2010-02-08 12:59

Re: ssh to N900 fails
 
Quote:

Originally Posted by Rob1n (Post 516066)
Is the routing table on your laptop correct?

This is the routing table of my laptop, is this OK?
Code:

root@epithalamus:~# route -n
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
172.16.23.0    0.0.0.0        255.255.255.0  U    0      0        0 vmnet8
192.168.177.0  0.0.0.0        255.255.255.0  U    0      0        0 vmnet1
192.168.254.0  0.0.0.0        255.255.255.0  U    2      0        0 wlan0
169.254.0.0    0.0.0.0        255.255.0.0    U    1000  0        0 wlan0
0.0.0.0        192.168.254.1  0.0.0.0        UG    0      0        0 wlan0


SubCore 2010-02-08 13:04

Re: ssh to N900 fails
 
Quote:

Originally Posted by joschum (Post 516152)
This is the routing table of my laptop, is this OK?

hm, that's strange. your default route points to "tun0", yet your previous ifconfig output doesn't list tun0 as interface.

do you use OpenVPN on your laptop? maybe your setup scripts for the encrypted tunnel didn't restore the original settings properly after disconnecting?

pycage 2010-02-08 13:10

Re: ssh to N900 fails
 
It could be a powersaving issue (I have this with my router in all N900 firmwares since 38.x except for 42-11). Ping the router from your N900 or do some other network traffic to make the router see the N900 again, so that you can ssh into it.
Setting down powersaving by one level helps, too (at the expense of battery life).

joschum 2010-02-08 13:10

Re: ssh to N900 fails
 
Quote:

Originally Posted by SubCore (Post 516160)
hm, that's strange. your default route points to "tun0", yet your previous ifconfig output doesn't list tun0 as interface.

do you use OpenVPN on your laptop? maybe your setup scripts for the encrypted tunnel didn't restore the original settings properly after disconnecting?

Oh, I pasted an output of route -n that was generated during a VPN session. Now the output above is corrected, it does not contain tun0 anymore...

SubCore 2010-02-08 13:21

Re: ssh to N900 fails
 
Quote:

Originally Posted by joschum (Post 516172)
Now the output above is corrected, it does not contain tun0 anymore...

hm looks good now... it should work :/

the only thing i can think of now is that maybe the vmware network module messes up the other interfaces. i've seen that happen sometimes...

joschum 2010-02-09 07:02

Re: ssh to N900 fails
 
I followed the steps that are described in the link below, now USB networking works fine for me. That is, ssh from my laptop running Ubuntu 9.10 to the N900 works :-)

http://wiki.maemo.org/N900_USB_Networking


All times are GMT. The time now is 10:38.

vBulletin® Version 3.8.8