RSS
 

SSH into iPhone over USB without Wi-Fi

11 Oct

SSH into a Jailbroken iPhone allows to browse files & folders on the device easily. When the iPhone and the computer are connected to the same WiFi network, it is easy to do SSH using any SSH client. SSH into the iPhone is also possible over USB cable and this comes handy in cases when the iPhone is not connected to the network. Steps below explains the procedure to SSH into the iPhone over USB cable.

Steps to SSH into iPhone through USB Cable (windows):

1. Jailbreak the iPhone and install OpenSSH from Cydia.
2. Download Python 2.6 and install it to c:\python26 folder.
3. Download usbmuxd file and extract it to C drive using winrar.
4. Connect the iPhone to windows machine over USB cable.
5. Open command prompt and type the below commands.

C:\> cd usbmuxd-1.0.8
C:\usbmuxd-1.0.8>cd python-client
C:\usbmuxd-1.0.8\python-client>\Python26\python.exe tcprelay.py -t 22:2222

SSH into iPhone without Wi-Fi

6. Download putty and open it.
7. On putty, enter Host Name as 127.0.0.1 and Port as 2222. Select connection type as SSH and click Open.

SSH into iPhone with putty

8. Now you are connected to iPhone over SSH. Type the username as root and the password as alpine to log into the iPhone.

SSH into iPhone putty

Note: Usbmuxd is a python module. So it works in Mac OS and other platforms as well. But the only limitation is, we can open only one SSH connection at a time. 

 
3 Comments

Posted in iPhone

 

Tags: , , ,

Leave a Reply

 

 
  1. Tex-Twil

    October 12, 2012 at 4:18 pm

    Nice, works also on OSX and Linux.

     
  2. iOS application security assessment: Sqlite data leakage | Pak Talent

    January 26, 2013 at 9:16 pm

    [...] Note: Wi-Fi is required to connect the iPhone over SSH. If the Wi-Fi connection is not available SSH into the iPhone over USB. 3. Run Putty and SSH into the iPhone by typing the iPhone IP address, root as username and alpine [...]

     
  3. Trillian

    March 16, 2013 at 3:21 am

    Many thanks for this tutorial. Works fine under Win 7 (64-bit) with WinSCP & PuTTY