maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   accessing N9 thru SSH over wifi (https://talk.maemo.org/showthread.php?t=79355)

mece 2011-11-02 20:00

Re: accessing N9 thru SSH over wifi
 
ssh over 3g is blocked by a script that drops connections over gprs to port 22. The script is aegis protected so you can't just go and change it. This is how I solved the problem:
http://talk.maemo.org/showpost.php?p...7&postcount=56

It's a workaround, but it works.

DaGr8Gatzby 2011-11-04 00:07

Re: accessing N9 thru SSH over wifi
 
How do I shut off sshd?

SteveYoungs 2011-11-04 02:41

Re: accessing N9 thru SSH over wifi
 
Quote:

Originally Posted by SteveYoungs (Post 1115359)
You don't have permission to run iptables at all (not even as root). Thank you very much, aegis mumbo-jumbo nonsence. :-(

But you do if you are not root. aegis, you are so god damned weird! I can't wait till I find a way to turn that off completely and forever.

SteveYoungs 2011-11-04 02:52

Re: accessing N9 thru SSH over wifi
 
Quote:

Originally Posted by mece (Post 1117488)
ssh over 3g is blocked by a script that drops connections over gprs to port 22. The script is aegis protected so you can't just go and change it. This is how I solved the problem:
http://talk.maemo.org/showpost.php?p...7&postcount=56

It's a workaround, but it works.

All this script does is add a iptables rule to the device's firewall, and it is only for incoming connections. It does not stop you from ssh'ing from the device over 3g.

You can also easily remove the iptables rule that it adds with:

Code:

/sbin/iptables -D INPUT -i gprs0 -p tcp -m tcp --dport 22
 -j DROP

Note though that you would need to do this after ever reboot of the device. And also because of aegis weirdness you have to do this as "user" not as "root".

kopla 2011-11-06 17:48

Re: accessing N9 thru SSH over wifi
 
Aerlier SSH connection worked but not after OpenSSH updated.
I only get error "Connection refused".

Any ideas how this problem could be solved?

shmerl 2011-11-06 20:42

Re: accessing N9 thru SSH over wifi
 
See also: http://forum.meego.com/showthread.php?t=4866

shmerl 2011-11-06 20:58

Re: accessing N9 thru SSH over wifi
 
Quote:

Originally Posted by SteveYoungs (Post 1118096)
Note though that you would need to do this after ever reboot of the device. And also because of aegis weirdness you have to do this as "user" not as "root".

It's actually good. When you really need to access the device through ssh, you can do this temporary removal, which is back after the reboot. But really for security reasons I wouldn't leave ssh open there for the outside network. Remote ssh forwarding works fine, and limits the session to your own machine.

SteveYoungs 2011-11-06 23:17

Re: accessing N9 thru SSH over wifi
 
Quote:

Originally Posted by shmerl (Post 1119216)
It's actually good. When you really need to access the device through ssh, you can do this temporary removal, which is back after the reboot. But really for security reasons I wouldn't leave ssh open there for the outside network. Remote ssh forwarding works fine, and limits the session to your own machine.

Yeah, I agree. In fact, I never SSH to my N9 over 3g/gprs. Why? Because the only time I'm using 3g I'm away from home, and when I'm away from home my N9 is with me. :)

Outgoing SSH (from the N9) is unaffected by this iptables rule, so for my usage at least, never need to touch the iptables for SSH.

J4ZZ 2011-11-07 08:23

Re: accessing N9 thru SSH over wifi
 
Have someone tried to just put the N9 into AP mode (Mobile Hotspot) and then connect over SSH? Always worked with the N900. ;)

Cheers,

J4ZZ

mooglez 2011-11-07 09:32

Re: accessing N9 thru SSH over wifi
 
Quote:

Originally Posted by kopla (Post 1119158)
Aerlier SSH connection worked but not after OpenSSH updated.
I only get error "Connection refused".

Any ideas how this problem could be solved?

the update disabled root login to ssh by default
you can login as user, or edit the sshd_config to allow root login again.


All times are GMT. The time now is 21:08.

vBulletin® Version 3.8.8