Results 1 to 9 of 9

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: SSH disable / Battery drain

  1. #1
    What's Jailbreak?
    Join Date
    Jul 2007
    Location
    Honolulu, HI
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default SSH disable / Battery drain
    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

  2. #2
    Quote Originally Posted by easternbmx View Post
    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.

    Quote Originally Posted by easternbmx View Post
    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; 09-15-2007 at 09:42 PM. Reason: Automerged Doublepost
    Best Regards

  3. The Following User Says Thank You to pengcm For This Useful Post:

    easternbmx (09-16-2007)

  4. #3
    What's Jailbreak?
    Join Date
    Jul 2007
    Location
    Honolulu, HI
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    fantastic. Just what i wanted

    fantastic. Just what i wanted
    Last edited by easternbmx; 09-16-2007 at 12:04 AM. Reason: Automerged Doublepost

  5. #4
    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.

  6. #5
    Green Apple
    Join Date
    Jun 2007
    Location
    Baltimore
    Posts
    78
    Thanks
    4
    Thanked 3 Times in 2 Posts

    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; 09-21-2007 at 07:59 AM. Reason: clarifications

  7. #6
    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.

  8. #7
    so if we don't install openssh, it shouldn't drain the battery?

  9. #8
    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

  10. #9
    I have the option to turn off ssh in sbsettings

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •