Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    Keeping SSH connection alive

    Reply
    regulus | # 1 | 2013-10-09, 06:57 | Report

    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).

    Edit | Forward | Quote | Quick Reply | Thanks

     
    pichlo | # 2 | 2013-10-09, 07:14 | Report

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

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to pichlo For This Useful Post:
    misiak

     
    peterleinchen | # 3 | 2013-10-09, 07:36 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following User Says Thank You to peterleinchen For This Useful Post:
    misiak

     
    Leinad | # 4 | 2013-10-09, 08:15 | Report

    In WinSCP in Advanced Site Settings, you can send Keepalives.

    Edit: works in Putty too (image 2).

    Edit | Forward | Quote | Quick Reply | Thanks
    Attached Images
      

    Last edited by Leinad; 2013-10-11 at 15:07.
    The Following 2 Users Say Thank You to Leinad For This Useful Post:
    misiak, peterleinchen

     
    pichlo | # 5 | 2013-10-09, 08:31 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    regulus | # 6 | 2013-10-09, 08:42 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    peterleinchen | # 7 | 2013-10-09, 14:41 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    JohnHughes | # 8 | 2013-10-11, 11:34 | Report

    Shounds like you need Mosh.

    Edit | Forward | Quote | Quick Reply | Thanks
    The Following 2 Users Say Thank You to JohnHughes For This Useful Post:
    mrsellout, reinob

     
    regulus | # 9 | 2013-10-11, 14:06 | Report

    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).

    Edit | Forward | Quote | Quick Reply | Thanks

     
    pichlo | # 10 | 2013-10-11, 14:41 | Report

    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.

    Edit | Forward | Quote | Quick Reply | Thanks

     
vBulletin® Version 3.8.8
Normal Logout