Reply
Thread Tools
Posts: 543 | Thanked: 151 times | Joined on Feb 2010 @ Germany
#21
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?
 
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#22
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
you should get a line containing "sshd" and ":22" somewhere. if not, your daemon isn't running, and you can start it by rebooting the device or by issuing
Code:
sudo gainroot
initctl sshd start
__________________
"What we perceive is not nature itself, but nature exposed to our method of questioning."
-- Werner Karl Heisenberg
 

The Following User Says Thank You to SubCore For This Useful Post:
Posts: 543 | Thanked: 151 times | Joined on Feb 2010 @ Germany
#23
Originally Posted by SubCore View Post
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
you should get a line containing "sshd" and ":22" somewhere. if not, your daemon isn't running, and you can start it by rebooting the device or by issuing
Code:
sudo gainroot
initctl sshd start
Well it says "5131 root 3884 S /usr/sbin/sshd -D" so it seems to be ok?

It is "initctl start sshd" by the way, I restarted it but I still can't connect.
 
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#24
Originally Posted by Crogge View Post
Well it says "5131 root 3884 S /usr/sbin/sshd -D" so it seems to be ok?
yes, seems ok.
now try
Code:
netstat -pan | grep ssh
that lists network connections / listeners, and that's where you should find a line with ":22", indicating that sshd listens on port 22 (sorry that i wrote :22 should be seen with ps aux )

then you can try
Code:
ssh root@127.0.0.1
on the device to check if local connections work.

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.
__________________
"What we perceive is not nature itself, but nature exposed to our method of questioning."
-- Werner Karl Heisenberg
 
Posts: 543 | Thanked: 151 times | Joined on Feb 2010 @ Germany
#25
Originally Posted by SubCore View Post
yes, seems ok.
now try
Code:
netstat -pan | grep ssh
that lists network connections / listeners, and that's where you should find a line with ":22", indicating that sshd listens on port 22 (sorry that i wrote :22 should be seen with ps aux )

then you can try
Code:
ssh root@127.0.0.1
on the device to check if local connections work.

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.
Thank you for your fast response!

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.
 
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#26
Originally Posted by Crogge View Post
tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN
hehe sorry i'm used to certain parameters i use on desktop / server systems all the time. -pan is one of them

":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
cd /etc/ssh
cp sshd_config sshd_config.bak
cat sshd_config.bak | sed 's/Port 22/Port 2022/' > sshd_config
initctl stop sshd
initctl start sshd
with these commands, you create a backup file of your current config, and then use the tool "sed" to change the value for Port from 22 to 2022.
(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
__________________
"What we perceive is not nature itself, but nature exposed to our method of questioning."
-- Werner Karl Heisenberg
 
Posts: 543 | Thanked: 151 times | Joined on Feb 2010 @ Germany
#27
Originally Posted by SubCore View Post
hehe sorry i'm used to certain parameters i use on desktop / server systems all the time. -pan is one of them

":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
cd /etc/ssh
cp sshd_config sshd_config.bak
cat sshd_config.bak | sed 's/Port 22/Port 2022/' > sshd_config
initctl stop sshd
initctl start sshd
with these commands, you create a backup file of your current config, and then use the tool "sed" to change the value for Port from 22 to 2022.
(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
I have set the SSH server to port "2222" and restarted it, I can connect locally just fine on port 2222 with SSH. But I still can't connect per WLAN or GPRS to SSH, only VNC works perfectly.

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?

Last edited by Crogge; 2010-02-12 at 00:49.
 
Posts: 891 | Thanked: 499 times | Joined on Nov 2009 @ UK
#28
I fixed mine by rebooting the router, try that.
__________________
Follow me on Twitter
 
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#29
Originally Posted by Crogge View Post
Any idea why the SSH server accepts only local connections?
not really...
"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.
__________________
"What we perceive is not nature itself, but nature exposed to our method of questioning."
-- Werner Karl Heisenberg
 
SubCore's Avatar
Posts: 850 | Thanked: 626 times | Joined on Sep 2009 @ Vienna, Austria
#30
Originally Posted by Crogge View Post
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)".
could you describe your network setup in more detail?
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?)
__________________
"What we perceive is not nature itself, but nature exposed to our method of questioning."
-- Werner Karl Heisenberg
 
Reply


 
Forum Jump


All times are GMT. The time now is 19:54.