Monday, 28 January 2013

iOS SSH over USB


Introduction:

Many a times, at client side we are not provided with Wifi access and connecting to our iOS device to read local data can be a real pain. At such a period, we can use a tool called as “usbmuxd” to connect to the Jailbroken iOS device running OpenSSH over the USB.

Detailed Steps:

Step 1: Make sure you have python installed on your machine. Download latest copy of “usbmuxd” using the command “git clone http://git.sukimashita.com/usbmuxd.git”.


Step 2: Navigate to the “python-client” folder and run the command “chmod +x tcprelay.py” and then run the tool using the command “./tcprelay.py -t 22:2222”


The “t” basically allows multiple threads to run so that multiple simultaneous ssh connections can be established.

Step 3: Now, once the tcprelay starts its work, we use the command “ssh root@localhost -p 2222” to forward the local port 2222 to remote port 22. Use the credentials “root/alpine” to connect to the OpenSSH server running on the device.


Now, all the commands which can be used over SSH can be run on the prompt provided. 

References:




4 comments:

  1. For windows, you can make use of "iTunnelMux".
    Syntax:
    C:\>itunnel_mux.exe --lport 22

    ReplyDelete
  2. Is the reverse possible ? Can the device connect to ssh on pc over usb ?

    ReplyDelete
  3. I do really appreciate this useful tutorial for Apple users, I also want to share this simple device, yet helpful called Sandisk iXpand for Apple Devices which adds extra space to your memory.

    ReplyDelete
  4. When you're tired, you want to relax after a stressful working hours, you need to have time to take care of the kids active.
    Please visit our website and play exciting flash games.
    Thanks you for sharing!
    Friv 4

    ReplyDelete