Wednesday, June 04, 2008

How To Hack Your iPhone To Manage Your Sites

Last Christmas my loving wife gifted me a new iPhone. I had traded in my trusty Sidekick II for this cutting edge piece of gadgetry. The only problem I had with my new iPhone was I could not remote SSH to my servers/websites for maintenance work while on the road. My Sidekick had a great little Terminal application that let me connect to any of my servers from pretty much any where in the world.


Well I finally figured out I could have the same luxuries on my iPhone, it just needed a little push in the right direction. I pulled the trigger and hacked my iPhone and installed OpenSSH and Terminal (along with a slew of games and other cool apps).

It was a bit of a learning process. My first attempt failed miserably and I had to basically restore my iPhone from my last back up point in iTunes.

So I am issuing a warning! Before trying these steps, make sure you have done a new backup of your iPhone using iTunes.


Ok, so on to my tutorial:

Step 1: Identify which iPhone "hack" program you want to use. I tried two software unlock variations: iBrickr and ZiPhone. I had problems with iBrickr. My phone pretty much got stuck in a reboot loop. I had to plug it in to my computer and then do a special button sequence just to get it to stop looping. It was a mess. Then I had to restore from iTunes.

I was much more successful using the Ziphone software. It connects to your phone and does the unlocking and initial software install very cleanly. My phone was unlocked and ready to go in a few minutes.

Step 2: By default it installed OpenSSH, and then I added Terminal using the Installer icon it added to my iPhone.

That's it! Once I had Terminal installed, I could then use the following command to SSH to my server(s):


Then it prompts you to login, etc. That's it! I could then run MySQL client, maintenance jobs, basic file editing, etc. Or even reboot my server if absolutely necessary.

It is definitely a life saver when you find yourself in a crunch and you don't have a laptop or internet access.

As a side note, here are some other interesting apps I downloaded to my phone:


Navizon - a GPS simulator that uses cell-tower locations to try and pinpoint your location. Works pretty well, and it integrates with GMaps, which is cool.


Sketches - a camera/image tool. Pretty slick interface allows you to take pictures and then mark them up and send them to folks.


VideoRecorder - I turned my iPhone camera into a video camera with sound. This slick tool also encodes the video so you can send it out via e-mail, or instantly upload it to YouTube. Nice program.


Services - This neat little app allows you to control some of the common services on your phone that may open you up for security problems. For instance, I turned off my SSH server service to avoid any problems with folks trying to hack into my phone though SSH.


Games - Of course I had to add a few games... =)


Hope this helps someone out there. The iPhone has become an essential tool in my webmaster future. If I learn any more tips or tricks, I'll be sure to share!

PS - One more neat tip, you can also run Apache on your iPhone! It is a condensed version, but hey pretty cool. Imagine having a back up of your site running on your iPhone... Ok, I'm getting carried away... ;-)

3 comments:

Anonymous said...

I have a few friends that I am going to refer to your post. They both have the same issues you had with your iphone and your solution may just be what they need. Thanks for sharing it.

sockmoney said...

Cool thanks! Ever since I unlocked it, it has opened a whole new world. Definitely recommend it!

Anonymous said...

Yeah - cellphones/mobile phones can be sooooo darn useful.

I use my Nokia 6120 Classic (potentially not as cool as your iPhone ;)) all the time. I get my gmail, my corporate email, log into whatever Instant Messenger applications, surf the internet at high speeds, it's so damn ...useful...!

Since getting it it's helped me alot!