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)

Crogge 2010-02-12 01:18

Re: ssh to N900 fails
 
I checked already the router but as I said I use SSH in the LAN/WAN also on custom ports and never had any issues.

Indeed it seems to be a network problem, I followed your log tutorial and look at the logs at the moment. Simply nothing happens at all when I try to connect with SSH but it looks ok when I connect on the phone itself on a second console.

I have a simply LAN network here, my notebook is connected per LAN and my N900 is connected per WLAN to a router. I use on the notebook itself Windows XP and Putty for SSH connections. As I said I also tested If I can connect from my N95 but got a timeout as result, it works fine to other SSH server's from both devices.

The only application which works always fine is UltraVNC on port 5900. I simply use the N900 IP (192.168.10.114).

SubCore 2010-02-12 10:30

Re: ssh to N900 fails
 
Quote:

Originally Posted by Crogge (Post 522290)
As I said I also tested If I can connect from my N95 but got a timeout as result, it works fine to other SSH server's from both devices.

other SSH servers on the same network or on the internet?
if you have never connected to an SSH server on the wlan, maybe your router (or the windows xp firewall) is really blocking that?
are your lan and the wlan in the same subnet?

the next step would be to use some network monitoring software on the laptop and/or your router. maybe that'll give some hints...
try to compare what happens when you use ultravnc and when you use ssh.

other than that, i'm at a loss, sorry... :o

taril 2010-02-17 12:05

Re: ssh to N900 fails
 
how can i make it work if my n900 is on gprs internet?
I cannot connet to my device in this case, Connection timeout

SubCore 2010-02-17 12:23

Re: ssh to N900 fails
 
Quote:

Originally Posted by taril (Post 531963)
how can i make it work if my n900 is on gprs internet?
I cannot connet to my device in this case, Connection timeout

this will not work.

when you are online over gprs, you don't really have a public IP. you get a private IP inside your carrier's network, and every connection to the outside is "masked" with the carrier's public IP. hence many, many devices appear to have the same public IP.

the only way to make it work over gprs (other than signing an enterprise-level contract with your carrier to get a real public IP) is to set up some sort of virtual private network (VPN) to a trusted network. then you could access the device directly from that trusted network.

Crogge 2010-02-23 04:41

Re: ssh to N900 fails
 
Quote:

Originally Posted by SubCore (Post 522738)
other SSH servers on the same network or on the internet?
if you have never connected to an SSH server on the wlan, maybe your router (or the windows xp firewall) is really blocking that?
are your lan and the wlan in the same subnet?

the next step would be to use some network monitoring software on the laptop and/or your router. maybe that'll give some hints...
try to compare what happens when you use ultravnc and when you use ssh.

other than that, i'm at a loss, sorry... :o

Well it is defiantly my router and I have no idea why because there are several other SSH machines in the network, the N900 is the only one which gets blocked. Its a Netgear WNR2000 router by the way.

I tested it via ad hoc and it worked fine, its really way easier to use the console via SSH then on the small N900 keyboard.

Scottlfa 2010-02-23 04:48

Re: ssh to N900 fails
 
mine works fine. openssh client and server ... run from the terminal with full path.

propelli 2010-02-24 20:54

Re: ssh to N900 fails
 
Quote:

Originally Posted by SubCore (Post 531996)
this will not work.

when you are online over gprs, you don't really have a public IP. you get a private IP inside your carrier's network, and every connection to the outside is "masked" with the carrier's public IP. hence many, many devices appear to have the same public IP.

the only way to make it work over gprs (other than signing an enterprise-level contract with your carrier to get a real public IP) is to set up some sort of virtual private network (VPN) to a trusted network. then you could access the device directly from that trusted network.

This might not be an answer to the original problem, but there is a simple way to connect to your n900 over gprs if your ssh server has a fixed public ip address.
By opening a reverse tunnel from n900 to the ssh server you can connect to n900 via that tunnel:

on n900 do:

ssh -R localhost:2222:localhost:22 username@server.ip

on the server do:

ssh -p 2222 root@localhost

This method of connecting to n900 with ssh works on wlan/lan also.

propelli

ogre 2010-03-09 07:40

Re: ssh to N900 fails
 
Perhaps i can shed some light on problems connecting SSH to the n900.

Step 1. Simply enable the extras repository and install openSSH client and server. You can check SSH is now running by using 'ps -ef |grep ssh'

Step 2. try simply ssh root@<lanIP> from another device on the same subnet.....Note: in most cases this will NOT work, even though SSH is set up.

The reason this doesnt work is the way the n900 conserves wifi power and doesnt 'keep alive' the wifi connection

3. From the terminal on the n900, try 'ssh root@127.0.0.1'. Note: in many cases 'localhost' will not resolve so no point using that.

4. if the n900 cant ssh to itself you have an additional problem, but if it does work then all is normal.

5. set the n900 to ping the router.

6. ssh to the n900. the 'pings' keep the wifi alive and you should have no problem getting in

irah 2010-04-12 04:38

Re: ssh to N900 fails
 
I have experienced the same problem, and sometimes I could get through, but the connection was really really slow/laggish and would disconnect after a few minutes.

The problem is not in the SSH server because I can SSH to the device from itself. Also I can ping from the device but I cannot ping the device from outside. Also nmap won't find my maemo at all.

I got mine working by opening the browser on maemo side, now the connection works and stays stabile. Pinging the router/other machine didn't work.

Does the browser do something to the interfaces / routing rules?

sashabe 2011-05-28 05:59

Re: ssh to N900 fails
 
I had this problem with OSX (Cyberduck) not connecting to via Asus WL-520GU router, and it got fixed by setting up 'Virtual server' tab in router settings as Port Range:22, Local IP:[N900 local IP], Local Port:22 and turning power save of the WiFi Network on N900 itself off, otherwise N900 couldn't be pinged from outside (and SSH to the device worked only when pinging FROM N900). On my other configuration with another Asus router, WL-500GP, things always were good. But that configuration has got a fixed IP, whereas this one has not.


All times are GMT. The time now is 02:30.

vBulletin® Version 3.8.8