Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.
Thread: SSH disable / Battery drainis a discussion within the
File Modsforums, a part of the
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...
09-15-2007, 09:05 PM #1
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
09-15-2007, 09:20 PM #2
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.
In the terminal, type:
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 DoublepostBest Regards
The Following User Says Thank You to pengcm For This Useful Post:
09-16-2007, 12:03 AM #3
fantastic. Just what i wanted
fantastic. Just what i wanted
Last edited by easternbmx; 09-16-2007 at 12:04 AM. Reason: Automerged Doublepost
09-21-2007, 07:32 AM #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.
09-21-2007, 07:53 AM #5
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
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
07-21-2008, 02:43 AM #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.
05-20-2010, 12:17 PM #7
so if we don't install openssh, it shouldn't drain the battery?
05-22-2010, 04:21 PM #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
05-24-2010, 09:47 AM #9
I have the option to turn off ssh in sbsettings