Regain Battery Life After Installing 3rd-Party Applications [Updated]

So you've just finished hacking your iPhone and installed every application you could find, but what the heck happened to your battery life? In the process of installing various things, you've likely installed OpenSSH, the tool which allows remote login to your iPhone from a computer. The problem is, SSH requires that a listener called SSHD constantly runs, waiting for a remote login attempt. This in turn drains your battery. The solution is to disable SSHD when you don't need it. Read on for the how-to.

For most seasoned iPhone hackers, disabling SSHD is a piece of cake. Unfortunately, it's not very easy or convenient. Instead, us mortals need a simple tool

In this guide, I'm assuming that you've installed Nullriver's Installer.app and OpenSSH. Here's how it's done:

  • Step 1: From Installer.app, download Community Sources if you haven't already.
  • Step 2: Under Utilities in Installer.app, install Services
  • Step 3: Go back to the home screen and wait for the iPhone to reload the Springboard. Slide to unlock and launch Services.
  • Step 4: From Services, toggle SSH off.

That's it! Your battery life should now return to its original state. If you ever need to use SSH (including SFTP) again, simply use Services again to turn SSH back on.

Enjoy!

Tip updated on October 2nd thanks to MrMacMan's suggestion.


battery life

Hi guys, I have problems with the batteries. It seems my iPhone runs out of juice very quickly. It charges for 2-3 hours and shows full battery and after playing for 20-30 min it goes half way Few times I left it to charge all night and to find out in the morning that the battery is on 10%. I don't have OpenSSH install on the phone. I m curious if anyone has a similar problem. I read that may be the wi-fi connection so I turned it off when I don't need it but the same result. I was wondering if any other applications run in the background and drain the battery life. I may need to exchange it for a new one.Thanks

battery

I had the same problem after I put the Iphone on my Bose SoundDock.
I think it burnt out my battery
every since then it only held charge over night and I didn't even use the phone at night.
I took it back to apple, they sent it to the factory and told me they couldn't fix it and gave me a replacement. ( not sure if its a refurbished or brand new but came in a similar box as the new one but just a1/4 the size of the original box)
I suggest you restore your phone and take it back to the apple store.
the only down thing about it is no phone for a week.
but I was able to put the sim back into my old phone for the time being


Quote:
Originally Posted by izmikiar View Post
Hi guys, I have problems with the batteries. It seems my iPhone runs out of juice very quickly. It charges for 2-3 hours and shows full battery and after playing for 20-30 min it goes half way Few times I left it to charge all night and to find out in the morning that the battery is on 10%. I don't have OpenSSH install on the phone. I m curious if anyone has a similar problem. I read that may be the wi-fi connection so I turned it off when I don't need it but the same result. I was wondering if any other applications run in the background and drain the battery life. I may need to exchange it for a new one.Thanks

NO com.openssh.sshd

I don't see "com.openssh.sshd" on my list
does that mean I don't have ssh running?
I used ifuntastic for my install of apptapp and so on

Quote:
Originally Posted by iphoneeeeee View Post
I don't see "com.openssh.sshd" on my list
does that mean I don't have ssh running?
I used ifuntastic for my install of apptapp and so on
If you didn't actually install OpenSSH, then you don't have it. It's not running (probably not even installed) if you don't see the com.openssh.sshd

Or you could just uninstall SSH until you need it again. The installer app makes it very easy to do this.

Quote:
Originally Posted by guest View Post
Or you could just uninstall SSH until you need it again. The installer app makes it very easy to do this.
Which is my action of choice.

Or Mac users could use the new iFuntastic instead of SSH

Quote:
Originally Posted by guest View Post
Or you could just uninstall SSH until you need it again. The installer app makes it very easy to do this.
Or if you're a Mac user, you could download iFuntastic 3.5.5 which now has a file browser that allows you to do many of the things you could do with an SSH connection. The iFuntastic solution requires you to USB tether your iPhone to your Mac.

But the iFuntastic method offers several advantages over SSH:

* no iPhone memory used (unlike SSH and BSD Subsystem)
* more secure than SSH (requires physical access to the iPhone)
* no battery drain

Marginal Effect of disabling SSHD

My battery life still seems to be very good after all the 3rd party hacks. Realistically, what is the benefit (in hours) of disabling SSHD?

Any answers?

Quote:
Originally Posted by iamse7en View Post
My battery life still seems to be very good after all the 3rd party hacks. Realistically, what is the benefit (in hours) of disabling SSHD?

Any answers?
I would say that it gives me a couple hours back after I disable it.

Quote:
Originally Posted by izmikiar View Post
Hi guys, I have problems with the batteries. It seems my iPhone runs out of juice very quickly. It charges for 2-3 hours and shows full battery and after playing for 20-30 min it goes half way Few times I left it to charge all night and to find out in the morning that the battery is on 10%. I don't have OpenSSH install on the phone. I m curious if anyone has a similar problem. I read that may be the wi-fi connection so I turned it off when I don't need it but the same result. I was wondering if any other applications run in the background and drain the battery life. I may need to exchange it for a new one.Thanks
I would try restoring the iPhone and not using any 3rd party stuff for a few days to see if that's your problem. If it still happens, I'd ask for a replacement.

new iPhone

Just got back from the Apple store with a new phone. It took 10 min. and 20 questions about the battery problem that I had. The guy gave me a brand new one from the box. Reinstalling all the 3rd party apps again. Will see if the battery is better on this one. If you go for a new one make sure to restore it before you go.

are you really sure sshd is burning cpu cycles? it should just block, waiting for someone to open port 22. if erica is around she can explain what i mean by this.

unless by this you mean that it somehow keeps the wifi or edge radio active when it could otherwise go into a low-power mode?

Quote:
Originally Posted by rob View Post
are you really sure sshd is burning cpu cycles? it should just block, waiting for someone to open port 22. if erica is around she can explain what i mean by this.

unless by this you mean that it somehow keeps the wifi or edge radio active when it could otherwise go into a low-power mode?
It makes sense to me. It's probably a combination of the process eating cycles and keeping the radio active.

iPhonegoboom concurs http://www.iphonegoboom.com/#battery

Quote:
Originally Posted by BillyMayes View Post
It makes sense to me. It's probably a combination of the process eating cycles and keeping the radio active.

iPhonegoboom concurs http://www.iphonegoboom.com/#battery
seriously though, a process that's blocked on I/O should not burn cpu cycles... unix 101. so it must be radio-related. anyway my battery life doesnt seem any worse after installing sshd, but i'm checking 5 email accounts every 5 minutes all day. this would probably mask any effect that sshd might have.

UIctl is not there !

There is a long list of things I can install, but UIctl is not there !
Under utilities, only iGXP2 is present.

How come

regards Jens

Quote:
Originally Posted by jens View Post
There is a long list of things I can install, but UIctl is not there !
Under utilities, only iGXP2 is present.

How come

regards Jens
It should be there. You might have caught it on an off day, but it's definitely under that category

Easier

Easier way is to go to installer app and get "service" you can just have a toggle switch to turn on and off ssh, as well as edge wifi and bt.

plz change the guide

Is OpenSSH not the same as "Nate True's iPhone SSH" (hacktheiphone.com/73/iphone_install_ssh_windows.html) ?? Services app doesn't show the SSH process on my phone where I installed Nate True's iPhone SSH which leads me to believe that maybe the two are not the same. Can anyone pls. point me to the right direction as to how can I go about disabling Nate True's iPhone SSH server process so that it doesn't keep running all the time. Thx.

Quote:
Originally Posted by vinkap View Post
Is OpenSSH not the same as "Nate True's iPhone SSH" (hacktheiphone.com/73/iphone_install_ssh_windows.html) ?? Services app doesn't show the SSH process on my phone where I installed Nate True's iPhone SSH which leads me to believe that maybe the two are not the same. Can anyone pls. point me to the right direction as to how can I go about disabling Nate True's iPhone SSH server process so that it doesn't keep running all the time. Thx.
I believe that other processes have different names. Look for something that has to do with SSH

No....there's no process with SSH in it. But I know that SSH is running on it since I can connect to the phone using WinSCP.

Quote:
Originally Posted by vinkap View Post
No....there's no process with SSH in it. But I know that SSH is running on it since I can connect to the phone using WinSCP.
some unix systems have something called "inetd" which listens to a bunch of ports and when someone opens one (like port 22 in the case of ssh) then inetd spawns the correct daemon (in this case sshd).

so you might not see sshd running all the time depending on whether the iPhone actually runs inetd. at least on my iphone, sshd is there running all the time. i installed it from AppTapp's installer.app.

Quote:
Originally Posted by vinkap View Post
No....there's no process with SSH in it. But I know that SSH is running on it since I can connect to the phone using WinSCP.
Try using UIctl and look for something having to do with SSH. If anything finds it, that will

I already tried UIctl to check for the running processes and there's no process with "SSH" or "inetd" in it. However, as I wrote before, I am still able to connect to my phone using WinSCP.

Quote:
Originally Posted by vinkap View Post
I already tried UIctl to check for the running processes and there's no process with "SSH" or "inetd" in it. However, as I wrote before, I am still able to connect to my phone using WinSCP.
Duno what to tell you. It sounds like you've got some strange non-standard ssh going there.

1.1.1

ssh does not show up as an option in services. has anyone else experienced that aswell..

Quote:
Originally Posted by vinkap View Post
I already tried UIctl to check for the running processes and there's no process with "SSH" or "inetd" in it. However, as I wrote before, I am still able to connect to my phone using WinSCP.
I have SSH installed from Independence & it doesn't show up as ssh or inetd. It shows up (in UIctl) as au.asn.ucc.matt.dropbear FWIW.

I have tried leaving it on & turning it off. I see no difference in battery life anyway so [shrug].

I don't really understand why turning off SSH would do much of anything to extend your battery life. I understand the argument that it's listening but so frickin what? It's also got processes constantly running to see if you have a phone call or SMS. I doubt sshd increases the load that much. When I had v1.0.2 I ran top and IIRC the load on the iPhone was quite low. Can't get top to run now on 1.1.1 so I can't check it.

See if the MSN is not logged-on

Its possible that the you might have some AOL\MSN\ICQ messenger turned on in the Apollo Messenger and it might try to connect to the nextwork and that might be draining the battery.

Just something to try ?

That was a big help...

Glad it didn't run my battery down all the way!

My battery seems to be dead.

I tried everything with my iPhone - but nothing helps (disabled OpenSSH, even removed it, removed Summerboard and any other services).

It's charges normally. But even in sleep mode it lives only 4-5 hours
For example when I'm charging my iPhone at the evening before I go to bed then disconnecting from the charger and going to sleep. At the morning I'm getting empty battery

What can it be?

Worked for me

Thanks that worked for me, n ow i have fantastic battery life and the ipod touch doesnt run hot anymore like it was

I don't get it...

Not sure if -- after 2 months -- anybody is reading this, but anyway...

Why would I actually need to dl and install another app ("Services") when I can just tap on SSH and then deactivate it in the OpenSSH preferences...?!? What's the difference, where's the advantage of using "Services"...?!?

Why?

sshd isn't multithreaded application, it's a classical listen() & fork() app, and when it waits for a new connection, it uses select(), so it doesn't run "actually" all the time or consuming other resources than memory. Sshd is just _waiting_ (select() is syscall, cheap enough).

who told you that sshd is draining power?

it worx!

opened up the box and it turned out to be 1.1.1. tried installing a few applications for sms forwarding... its working perfectly fine. So far in Pakistan there are not service centres, thats why net surfing helps alot to troubleshoot all this information helps man.

*peace*

Hi guys, is SSH really necesary to have on my iphone?what do i use it for?and if i dont need it, how do i uninstall?thank you.

Same heer

I'm running a 1.1.1, with added "Install", "Customize", "BSD Subsystem" and a couple of "Books".
My battery is good for 6 to 16 h, (that is if i'm only using it for 10 min of speach, and nothing else)
The "thing" is trying very often to find a network (you know, beep, bhrep near a radio), and by often, i mean 2-3 seconds.
I've tryed "Apple's guide for prolonging battery life", but realy, that's common sense.
Anyway, it's not working.
Any suggestions? (not possible to send to Apple )

This Whole Post is Incorrect from the very beginning!

This post caught my attention at first, but after reading further it is totally incorrect.

Other SSH programs for the iPhone might drain battery life, however OPENSSH does not! OpenSSH does not have a constantly running daemon. It is simply added to the list of connections that the inetd daemon (which always runs on your iPhone) listens for. If it sees you trying to connect, it will start up sshd to handle it. When you disconnect, the sshd process goes away. This is exactly how it runs on Apple laptops. ONLY OPENSSH CAN DO THIS. See below...

Will this kill my battery?

No. Unlike other ssh packages for the iPhone, this package does not have a constantly running daemon. It is simply added to the list of connections that the inetd daemon (which always runs on your iPhone) listens for. If it sees you trying to connect, it will start up sshd to handle it. When you disconnect, the sshd process goes away. This is exactly how it runs on Apple laptops. So, no, this package will not kill your battery if left turned on because, in truth, there is nothing actually running. My package is the only one that can claim this, to the best of my knowledge.

Take it directly from the source the knows (they wrote it) http://blog.psmxy.org/pkg-info/openssh/

SSH Cant b turn off !!!

when i start the service App,i saw the ssh but it gone in few second!!
how i gonna do?

Quote:
Originally Posted by elson3344 View Post
when i start the service App,i saw the ssh but it gone in few second!!
how i gonna do?
This means you are not running an openssh program. Therefore, you do not need this.

Is there a way of seeing what apps are running as I left mine on standby overnight and int he morning it was on 6% and I can't see any apps running.

I did put it on airplane mode as I didn't want any calls/texts to wake me.

Quote:
Originally Posted by xxx View Post
This means you are not running an openssh program. Therefore, you do not need this.

iPhone Battery -

Carphone warehouse (UK), just finished the £169 deal on 8GB iPhones. I bought mine on 02 May. Strangely this week they announced that they are no longer selling the 'old style' I purchased just 14 days ago. Why is this important? Simply put the Battery life of the iphone I have is criminally pathetic and I have had to send it back to be 'fixed'.

Has anyone out there sent there iP off to be 'fixed' if so I would love tot hear if its made any difference. Are there anyother fixes to extend battery life, I have not downloaded other app's.

ciao