![]() |
ssh to N900 fails
Hi,
I am trying to ssh into my Nokia N900 but it fails. I set up usb0 and made sure that wireless is turned on: Trying to access the N900 from my laptop I get the following message: Code:
schm@epithalamus:~$ ssh root@192.168.254.219 Code:
schm@epithalamus:~$ ssh root@192.168.2.15 joschum |
Re: ssh to N900 fails
I am actually experiencing this also.
I have verified SSHd is running, confirmed the IP address of the N900 on my WLAN, and also confirmed connectivity. I can get a secure shell on the N900 from loopback, localhost and the internal LAN address when SSH'ing directly on the device. I just can't hit it from any other machine. I am running down ssh configs right now to see if anything randomly changed. |
Re: ssh to N900 fails
looks like a problem with your ip address setup / routing
on your n900 issue the following commands as root and post the output: cat /etc/ssh/sshd_config route ifconfig -a on your computer from which you are trying to connect, issue: ifconfig -a route, or route print, or ip route show |
Re: ssh to N900 fails
try (while connected to the phone)
ifconfig usb0 down ifconfig usb0 up then try to ssh in again |
Re: ssh to N900 fails
For some reason I am experiencing decay on WiFi. I open a constant ping session on the N900 to my workstation, and everything works fine.
|
Re: ssh to N900 fails
Quote:
cat /etc/ssh/sshd_config Code:
# Package generated configuration file Code:
Kernel IP routing table ifconfig -a Code:
lo Link encap:Local Loopback ifconfig -a gives: Code:
eth0 Link encap:Ethernet HWaddr 00:22:68:0c:62:fb |
Re: ssh to N900 fails
Quote:
neither has an IP address configured, your "/etc/network/interfaces" is probably missing some bits. once both interfaces have the correct IPs (192.168.2.14 and .15), the routing table should be updated automatically. |
Re: ssh to N900 fails
When trying to log in over wireless I suggest to check how close to access point your N900 is. Once I moved my phone to the other side of the room my troubles went away. I think N900 is somewhat susceptible to near field problems.
|
Re: ssh to N900 fails
Quote:
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? |
Re: ssh to N900 fails
Is the routing table on your laptop correct?
|
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. |
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. |
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
|
Re: ssh to N900 fails
Quote:
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? |
Re: ssh to N900 fails
Quote:
Code:
root@epithalamus:~# route -n |
Re: ssh to N900 fails
Quote:
do you use OpenVPN on your laptop? maybe your setup scripts for the encrypted tunnel didn't restore the original settings properly after disconnecting? |
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). |
Re: ssh to N900 fails
Quote:
|
Re: ssh to N900 fails
Quote:
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... |
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 |
Re: ssh to N900 fails
I have also a problem to connect per SSH to my N900 over WLAN. Yes, I have installed the OpenSSH Client+Server.
This are the things which I tested already: - I can't ping the phone at all, simply no response - I can ping my notebook / servers from the phone - I can connect with UltraVNC to the phone and use it - The SSH client on the phone work's fine and connect's for example to my servers I simply get a timeout when I try to connect to my phone on port 22 per SSH. Any idea's? |
Re: ssh to N900 fails
the phone doesn't respond to pings, so that's expected.
make sure the ssh daemon is running - type in xterm: Code:
ps aux | grep ssh Code:
sudo gainroot |
Re: ssh to N900 fails
Quote:
It is "initctl start sshd" by the way, I restarted it but I still can't connect. |
Re: ssh to N900 fails
Quote:
now try Code:
netstat -pan | grep ssh then you can try Code:
ssh root@127.0.0.1 if local connections work but you still can't connect from your laptop/pc, then we'll have to install sysklogd and enable logging for ssh. |
Re: ssh to N900 fails
Quote:
I used "netstat -a | grep ssh" because -pan / -p didn't work. It display the following informations: tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN netstat: no kernel support for AF INET6 (tcp) netstat: no kernel support for AF INET6 (udp) netstat: no kernel support for AF INET6 (raw) Connecting locally to the SSH server from the N900 itself worked fine. |
Re: ssh to N900 fails
Quote:
":ssh" is equal to the ":22" i was talking about, the -n parameter for netstat should trigger the display of port numbers instead service names. anyhow... do you have some sort of firewall configured which may be blocking port 22 on your wlan? you could try to change the port on which sshd listens: Code:
sudo gainroot (or you edit the file sshd_config some other way, with vim f.ex.). now you can try connecting to the device using the new port: Code:
ssh -p 2022 root@n900.ip |
Re: ssh to N900 fails
Quote:
I tested already another SSH client and my notebook, even my N95 to be sure that the problem is not on the client side. That displayed the following error "Host unreachable (-191)". Any idea why the SSH server accepts only local connections? |
Re: ssh to N900 fails
I fixed mine by rebooting the router, try that.
|
Re: ssh to N900 fails
Quote:
"0.0.0.0:ssh" from the netstat output indicates that it's listening on all interfaces, and the N900 doesn't have a firewall or similar. and i don't think it's actually the ssh daemon. a timeout usually is due to a networking problem. but you say VNC works, so the network should be ok... you can verify that by enabling logging for the ssh daemon, i've described how to do that here. if you don't see any events there while connecting, you have a problem elsewhere. btw, connecting to the N900 when it's on gprs is a whole different story, because you don't get a public IP for direct access. |
Re: ssh to N900 fails
Quote:
your notebook and the N900 are both on the same wlan? which software do you use, which OS? do you connect to the N900's ip or hostname? (what do you use for the VNC connection?) |
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). |
Re: ssh to N900 fails
Quote:
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 |
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 |
Re: ssh to N900 fails
Quote:
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. |
Re: ssh to N900 fails
Quote:
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. |
Re: ssh to N900 fails
mine works fine. openssh client and server ... run from the terminal with full path.
|
Re: ssh to N900 fails
Quote:
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 |
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 |
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? |
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 11:59. |
vBulletin® Version 3.8.8