OpenSSH via a USB connection
In this tutorial I'll cover how to use SSH over a serial connection (your iPhone's USB
sync cable). This is great if you are on the road and don't have access to a Wi-Fi network
as you can still interact with your iPhone's file system. I came across this process in a
thread over at the MacRumors forums. "-aggie-" detailed the process
here in
post 14. A big thank you goes out to him.
I realize there are programs out there like
DiskAid,
iExplorer and
PhoneView that do this
more easily (and at a cost), however none of those programs allow you to change file
permissions. Of course you could use a secondary program like YummyFTP (or the Mac's
Terminal) to chmod files if you wanted.
Step 1.
Download iPhoneSSH
here. When you see the
file on the left appear, double click it to decompress it and you'll have a folder.
Step 2.
On your Mac go to your Applications folder, and then into the Utilities folder. Launch
the Terminal.app program. In the terminal window type the letters
cd
Press the space bar once. Open the iPhoneSSH folder. Drag the python-client folder into
the Terminal window.
The path to that folder will now be added in the Terminal window.
Press enter then type
python tcprelay.py -t 22:2222 &
Press enter. You should receive a reply message immediately.
Step 3.
Launch YummyFTP (or any other FTP client). Click the Add button.
Enter the following values. The default password is alpine (you may have changed it
already). Click Save.
Double click the iPhone USB entry to make the connection.
Your computer's file system is on the left, the iPhone's on the right.
To change permissions on a file first select the file you want to modify then right click
it and select Get Info.
You could also change permissions in the Terminal used below.
Alternate log in method
If you don't want to use a GUI then you can do everything using the Terminal. Once you've
invoked tcprelay enter the following command:
ssh -p 2222 root@localhost