Share It

Tuesday, December 22, 2009

SSH to iPhone via USB

 I found a few other tutorials about SSH to iphone using USB cable. A few of them work but some guys are having problems. Here I will gather the working items/solutions and the stuff which worked for me and for some other users (downloadables / solution to errors).

So we will start with the required softwares...
As described by many others you will obviously need iTunnel to make connection. Some guys are having problems because of using wrong itunnel for wrong iTunes version. I have added link for itunnel for both iTunes 8 and iTunes9. Download accordingly.

For iTunes 8 http://www.ziddu.com/download/7854833/iTunnel3.zip.html

For iTunes 9 http://www.ziddu.com/download/7854834/itunnel9.zip.html

Now we can use Putty for SSH and WinSCP for FTP. These are the simplest one. Another Good Tool is Tunnelier Portable. This can perform a hell lot of other functions. Link for this is below..

Tunnelier Portable http://www.ziddu.com/download/7854877/TunnelierPortablev2.0.4.30.zip.html

For simple use I will recommend using Putty or WinSCP.

Now extract itunnel.

Now open up CMD, navigate to the itunnel folder we just extracted.
We actually need to Run this::: itunnel.exe 22 22
But there is Batchfile in the folder i.e. RunTunnel.bat
This will run the required command. So just execute it...

Now open WinSCP,
Enter HOST name: 127.0.0.1
Port: 22
File Protocol should be SFTP

Username: root
Password: alpine     (it is the default pwd for iphone SSH, I recommend changing it)

Hit login and you are done.

Now coming to Solutions to problems which people are facing..

First of all use relevent itunnel for iTunes.

(oh and DO INSTALL iTUNES if you do not have it installed :P)

If you are getting something similar to this:::
AMDeviceNotificationSubscribe = 0
iPhone attached !
AMDeviceConnect = 0
AMDeviceIsPaired = 0
MobileDevice: AMDeviceValidatePairing: Could not load pairing record C:\Documents and Settings\abstract\Application Data\Apple Computer\Lockdown\670e0bxfa852168e1e74a6b78c3f73619dca1ba1.plist
AMDeviceValidatePairing = -402653147
AMDeviceStartSession = -402653147
AMDeviceStartService = -402653154
AFCConnectionOpen = 0

This is because it is not able to find the plist file. To solve this go to  ::
C:\Documents and Settings\All Users\Application Data\Apple\
Now from here copy the Lockdown folder
and
Paste it at
C:\Documents and Settings\abstract\Application Data\Apple Computer\

(You will have a different folder in place of abstract :p)

Also some people are still having the same error after copying the Lockdown folder. It is because, either their plist file is different from specified in the error. To solve this just connect to iphone via iTunes and sync it. After sync try again. It should solve the issue.


5 comments:

  1. password is rejected. but I know what my password is because i did it with Terminal on the ipod. why does it reject it if it is the right one?

    ReplyDelete
  2. Works like a charm. Helped me fix an app that kept my phone stuck in reboot. Cheers!

    ReplyDelete
  3. Hi ,

    I'm getting below error. I've Itune 10. I'm not finding any specific itunnel for this, So I'm using itunnel9.
    My phone is iphone 4 , not jailbroken. Does this only work in jailbroken phones :)


    new connection !
    MobileDevice: AMDeviceNotificationSubscribe: USBMuxListenerCreate: No error
    AMDeviceNotificationSubscribe = -402653085
    callback error !


    Please suggest.

    Rgds
    Ram

    ReplyDelete
  4. Yeah this works only for jailbroken iphones. And you should also have OpenSSH installed on your iphone from Cydia.

    Thanks...

    ReplyDelete

Share It

Developer Instincts