maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Keeping SSH connection alive (https://talk.maemo.org/showthread.php?t=91558)

regulus 2013-10-09 06:57

Keeping SSH connection alive
 
How can I keep SSH connection from my computer (putty, WinSCP...) to my N900 (with ssh server turned on) alive even after the screen goes off? It usually disconnects me a few minutes after the N900 screen goes to standby; I guess this has something to do with power savings and dropping wifi when on standby?
I've had similar problems on Android and iOS (with Android, there's usually a setting in sshd app to prevent the disconnect, and on iOS there's the Insomnia tweak for these purposes).

pichlo 2013-10-09 07:14

Re: Keeping SSH connection alive
 
I've never noticed that behaviour but you can experiment with power saving mode which is a per-connection property in Settings->Internet connections.

peterleinchen 2013-10-09 07:36

Re: Keeping SSH connection alive
 
Noticed that too under Windoze on N9 (and also N900) and 'solved' it by opening a x-term and typing a simple 'ping hostmachine.mshome.net' or 'ping ip_address' and leave it open as long as I need that session.

Leinad 2013-10-09 08:15

Re: Keeping SSH connection alive
 
2 Attachment(s)
In WinSCP in Advanced Site Settings, you can send Keepalives.

Edit: works in Putty too (image 2).

pichlo 2013-10-09 08:31

Re: Keeping SSH connection alive
 
Hmm. All the above makes me think. Perhaps I've never left my SSH sessions idle for hours on end. I generally open, do what I do, close. Like everything else, for that matter. The general idea is, take as little as you need, as opposed to as much as you can.

regulus 2013-10-09 08:42

Re: Keeping SSH connection alive
 
It wasn't "hours", it was "minutes" (and only seconds for being idle)... I doubt keep-alives would do the trick, as it happens a few minutes after the screen turns off on N900. So I presume it has something to do with power saving stuff -- I'll have a look into that.

peterleinchen 2013-10-09 14:41

Re: Keeping SSH connection alive
 
Yep, but I cannot remember if it had something to do with blacking screen (but most probably).
So I doubt the KeepAlives from WinSCP works, as the "watchdog pings" needed to be sent from device to computer. If sent from computer to device, the same thing happens.

JohnHughes 2013-10-11 11:34

Re: Keeping SSH connection alive
 
Shounds like you need Mosh.

regulus 2013-10-11 14:06

Re: Keeping SSH connection alive
 
Strangely enough, I didn't get disconnected yesterday when working in Putty (also being idle for a while). I'll keep an eye if it only happens with WinSCP, though.

As for the power settings (haven't changed it yet) - I have it set to Maximum (the other two settings being Intermediate and Off). But I read that this only pertains to the speed of wifi connection (or maybe they were referring to the transceiver power, which is set to 100 mW on my phone, not 10 mW).

pichlo 2013-10-11 14:41

Re: Keeping SSH connection alive
 
I have it at 100 mW too as 10 mW doesn't work in parts of my house.

FWIW, I ran SSH over PuTTY on Windows 8 last night for about two hours with no problems whatsoever. The phone was on a charger though. No idea if that makes a difference. I do it as a habit since the battery runs like a leaky bucket when an SSH session is active.


All times are GMT. The time now is 07:55.

vBulletin® Version 3.8.8