SSH over USB using usbmuxd
You can either download a binary and run that or use a python script. The python script is a lot slower than the binary version. On Linux the python method is mostly deprecated, use the binary version provided by libimobiledevice. There is also a newer solution called gandalf.
Using binary
On Windows, ensure iTunes is installed, then download itunnel_mux_rev71.zip from Google Code. Unzip to a directory of choice.
On OS X and Linux, install libimobiledevice from your package manager.
Then:
- Windows: Run
path/to/itunnel_mux.exe --iport 22 --lport 2222
- OS X/Linux:
iproxy 2222 22
Connect to localhost -p 2222
as you would over wifi.
If you have multiple devices connected, it may be useful to run multiple instances, specifying UDIDs and ports like so:
iproxy 2222 22 abcdef0123456789abcdef1234567890abcdef12 & \ iproxy 2223 22 9876543210fedcba9876543210fedcba98765432
Making iproxy run automatically in the background on OS X
- Install it with Homebrew (
brew install libimobiledevice
). - Create the file
~/Library/LaunchAgents/com.usbmux.iproxy.plist
with the contents:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>com.usbmux.iproxy</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/iproxy</string> <string>2222</string>