1. easternbmx's Avatar
    So I have heard conflicting things about the battery usage of the SSH server. I have read multiple places that it will drain the battery more quickly, and it seemed to when i have it installed. According to Hillie, a couple threads down, it does not. Any clarification anybody?

    Also, Can anybody give a slightly clearer description of how to disable to the SSH if it does in fact cause battery drain. I have been playing with Hillie's tapp scripts but haven't had much luck yet.

    Using Windows for now
    2007-09-16 04:05 AM
  2. pengcm's Avatar
    So I have heard conflicting things about the battery usage of the SSH server. I have read multiple places that it will drain the battery more quickly, and it seemed to when i have it installed. According to Hillie, a couple threads down, it does not. Any clarification anybody?

    Also, Can anybody give a slightly clearer description of how to disable to the SSH if it does in fact cause battery drain. I have been playing with Hillie's tapp scripts but haven't had much luck yet.

    Using Windows for now
    It is an extra program that needs to be run, so yeah!
    It will drain battery more quickly, since it's always on.
    However, I imagine there will not be much difference.
    It's unlike turning on Wifi all the time, that's hardware radio.
    This is software.

    Also, Can anybody give a slightly clearer description of how to disable to the SSH if it does in fact cause battery drain. I have been playing with Hillie's tapp scripts but haven't had much luck yet.

    Using Windows for now
    To disable it on the fly, u need a terminal utility.
    In the terminal, type:
    # launchctl
    once in the launchctl, type:
    launchctl% stop com.openssh.sshd
    there, u r done.

    to restart, just type start instead of start.
    Last edited by pengcm; 2007-09-16 at 04:42 AM. Reason: Automerged Doublepost
    Best Regards
    2007-09-16 04:20 AM
  3. easternbmx's Avatar
    fantastic. Just what i wanted

    fantastic. Just what i wanted
    Last edited by easternbmx; 2007-09-16 at 07:04 AM. Reason: Automerged Doublepost
    2007-09-16 07:03 AM
  4. beijingjj's Avatar
    launchctl is not stopping the service for me. I have to go in and kill the pid but then it restarts automatically.

    How can I change it so it does not start automatically. Instead I would like to start sshd from the terminal prompt (or a script) as needed.
    2007-09-21 02:32 PM
  5. hillie's Avatar
    I have not noticed any battery drain *having sshd idle* all the time, as it used to run all the time for a while until I found Tapp and wrote those scripts. If you use ps and top to evaluate cpu usage, you'll see that idle processes use less than 1% of the cpu, and that's what causes power drain, when things use the cpu.

    What DOES drain the battery is having the backlight on all the time, it drains it BIG TIME, and that happens if you either turn AutoLock off or keep tapping the screen to keep it from locking.

    I really wish there was a way so that only wi-fi stayed on all the time. coz it would be way more battery efficient, but oh well.

    the command you want to use is:

    launchctl unload -w /Library/LaunchDaemons/com.openssh.sshd.plist
    stop SHOULD stop the service, but it doesn't seem to work very well. I've noticed also if you try to start the server (with launchctl start) after doing unload -w, it tends to say it doesn't exist. weird. (note: load -w works ....)

    Please note if you're trying to stop sshd via launchctl and you're currently ssh'd into your iPhone it _will_ not work.

    However, when you reboot your phone ssh will not be started. The alternative is to type it from one of the terminals available on Installer.app

    also that location of the plist file is for the OpenSSH available on Installer.app .. i dunno about the other SSH available on iBrickr.
    Last edited by hillie; 2007-09-21 at 02:59 PM. Reason: clarifications
    2007-09-21 02:53 PM
  6. McBanjo's Avatar
    Can I just note that apparently this isn't necessary on 2.0 Pwned devices using Cydia to install OpenSSH.

    Check the FAQ in your Cydia app. It's supposedly different, and they say there is no good reason to disable SSH on your phone now.
    2008-07-21 09:43 AM
  7. laz305's Avatar
    so if we don't install openssh, it shouldn't drain the battery?
    2010-05-20 07:17 PM
  8. computid's Avatar
    according to Saurik, OpenSSH doesnt drain the battery all the time because its not running all the time. It waits for you to connect then starts running meaning that its not draining the battery.
    The gates in my computer are AND, OR and NOT; they are not Bill.

    Iphone 3G, Ultrasn0w'ed using T-Mobile UK on a G1 Contract, 800 mins, Unlimited texting and unlimited internet! <--1337
    2010-05-22 11:21 PM
  9. wa2ruff's Avatar
    I have the option to turn off ssh in sbsettings
    2010-05-24 04:47 PM
LINK TO POST COPIED TO CLIPBOARD