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 -t 22:2222

SSH into iPhone without Wi-Fi

6. Download putty and open it.
7. On putty, enter Host Name as 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. 


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

  4. Tom Jones

    August 13, 2014 at 2:35 pm


    I got “Server unexpectedly closed connection” in putty following the instructions, using iPhone 3G. This is python’s script output:

    Incoming connection to 2222
    Waiting for devices…
    Connecting to device
    Exception happened during processing of request from (‘′, 53203)
    Traceback (most recent call last):
    File “C:\python26\lib\”, line 558, in process_request_thread
    self.finish_request(request, client_address)
    File “C:\python26\lib\”, line 320, in finish_request
    self.RequestHandlerClass(request, client_address, self)
    File “C:\python26\lib\”, line 615, in __init__
    File “”, line 82, in handle
    dsock = mux.connect(dev, self.server.rport)
    File “C:\usbmuxd-1.0.8\python-client\”, line 235, in connect
    return connector.connect(device, port)
    File “C:\usbmuxd-1.0.8\python-client\”, line 206, in connect
    raise MuxError(“Connect failed: error %d”%ret)
    MuxError: Connect failed: error 3

    I also shared the internet connection by USB, and using iPhone new address ( then I get a “connection refused error”.