How do I SSH into my iPhone (Mac / Windows instructions)?
When your iPhone is jailbroken many features and functions of the device can be accessed by the command line, and files can be transferred between the iPhone and your computer outside of iTunes. Access to the iPhone is accomplished using the Secure Shell (SSH) network protocol. Assuming your iPhone is already jailbroken and has Cydia installed, follow these instructions to SSH into the device.
1. Open Cydia and navigate to Sections -> Networking -> OpenSSH
2. If there's a green check mark next to OpenSSH the package is already installed. If not, then install OpenSSH.
3. Find your iPhone's IP address.
4. On Windows, you must install an SSH client for your computer. One example of a free SSH client is PuTTY. Once installed run the program and open a new connection.
5. The hostname is your iPhone's IP address. The username is root. Password is alpine.
6. On Mac OS X, open a new console window using Terminal. This program can be found under Applications -> Utilities -> Terminal.
7. Type 'ssh root@(your iPhone's IP address)' without the quotes or parentheses into the Terminal console and hit return. Enter the password 'alpine' and hit return.
8. If asked "Are you sure you want to continue connecting (yes/no)?" type 'yes' to continue.
9. You are now connected via SSH to your jailbroken iPhone.
10. Change the default root password on your iPhone for security and use this password for future connections.
If your session gets interrupted it may help to turn off Auto-Lock to keep the connection open. To turn off Auto-Lock navigate to Settings -> General -> Auto-Lock -> NeverTo end your SSH session type 'exit' at the command prompt.