Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.
Thread: SSH disable / Battery drain
is a discussion within theFile Mods
forums, a part of theiPhone Modding
section;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, 08:05 PM #1What's Jailbreak?
- Join Date
- Jul 2007
- Location
- Honolulu, HI
- Posts
- 2
- Thanks
- 1
- Thanked 0 Times in 0 Posts
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, 08:20 PM #2
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.
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 08:42 PM. Reason: Automerged Doublepost
Best Regards
-
The Following User Says Thank You to pengcm For This Useful Post:
easternbmx (09-15-2007)
-
09-15-2007, 11:03 PM #3What'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 wantedLast edited by easternbmx; 09-15-2007 at 11:04 PM. Reason: Automerged Doublepost
-
09-21-2007, 06: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, 06: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:
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 ....)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 06:59 AM. Reason: clarifications
-
07-21-2008, 01: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, 11:17 AM #7Livin the iPhone Life
- Join Date
- Jun 2007
- Location
- Miami
- Posts
- 1,451
- Thanks
- 564
- Thanked 140 Times in 100 Posts
so if we don't install openssh, it shouldn't drain the battery?

-
05-22-2010, 03: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, 08:47 AM #9
I have the option to turn off ssh in sbsettings




LinkBack URL
About LinkBacks
Reply With Quote



