How to Trasfer Files FROM and TO the iPhone Using SSH (Windows)
There are a lot of reasons to Jailbreak your iPhone and one of my favorite and most useful reasons is you can transfer files between iPhone and PC using SSH.
So, here is a short tutorial on how you can use SSH on your iPhone and use it for transfer any files to your computer or from your computer (Windows). Another thing to note and why SSH is so awesome is the fact that you no longer need your USB cable… That’s Right, you can use it to transfer files, music, apps, ring-tones, photos and videos without the USB cable, you will be transferring all your files through your wireless / Wi-Fi connection…
First of all, What is SSH? The SSH stands for “Secure Shell and it is a protocol for creating a secure connection between two computers (in this case between a PC and the iPhone). The secure SSH connection provides authentication and encryption. SSH also provides compression. The SSH protocol is defined by the IETF Secure Shell Working Group(secsh). SSH was designed as a replacement for the legacy `telnet` application. The computer being connected to must be running an ssh daemon, or server, process (in this case the server will be running on the iPhone not your PC). The computer which is attempting to connect must be running an SSH client.
NOTE: You must have a Jailbroken iPhone in order to use this feature…
To start using SSH you first have to install on your iPhone via Cydia… So first thing you need to do is open up Cydia and search for “OpenSSH” to find the package. Tap the Install button to install it on your iPhone. Once installed, restart your iPhone. NOTE: You will not see or find any icon for SSH on the home screen or the entire SpringBoard, so don’t look for it. After you will reboot your iPhone the SSH server will be automatically launched and listening for remote request in background.
NOTE: You have to make sure your iPhone is turned on the whole time during the SSH file transfer. From factory / by default the iPhone Auto-Lock is set for one (1) Minute so your iPhone would lock and go to sleep after one minute of inactivity… I strongly recommend changing the timer on the Auto-Lock from one minute to 5 minutes or disabling it by setting it to NEVER (I suggest you to disable it before using SSH so you don’t loose any data wile the file transfer). On your iPhone go to SETTINGS -> GENERAL -> AUTO-LOCK and set it to 5 Minutes or Never.
NOTE: Before you can start the transfer process you have to find out your IP address
Ok, by this point your iPhone is already enabled with SSH and is ready (listening) for your incoming SSH request. Before you can transfer files from your computer to iPhone, you have to find out the IP address of your iPhone.
To check for the IP address, go to SETTINGS -> Wi-Fi. Tap on the connected Wi-Fi network (Blue Arrow on the right) and view the details. You should see the IP address of your iPhone. IP address for my iPhone is 192.168.1.6
NOTE: Connect your PC to the iPhone via WinSCP
For Windows users, I highly recommend you to download WinSCP, which is a free SSH client for Win XP/Vista. You can download it for free from the WinSCP site, click here to download the latest version. Once you download the latest version of WinSCP install it, just double-click on the downloaded executable file and follow the instruction to install it on your PC. (This is very easy and straight forward)
Once the installation part in completed, start WinSCP and click “New” to connect to iPhone. In host name field, type in the IP address of your iPhone (the one you looked up earlier). Make sure the port number is set to “22” by default this option is already set to 22 but in case it’s not then change it. For user name use “root” and for password use “alpine” (NOTE: This user name and password is the same for all iPhones and iTouch iPods ever made by Apple). Don’t worry about any other fields or options.
Don’t click “Login” button yet… Click “Save” button so this connection profile is saved for your future use, otherwise you will have to fill out this information every time you would want to use SSH.
Ok, now you can go ahead and click “Login” to start making connection with your iPhone. NOTE: First time you will try to establish a connection with your iPhone you will be prompted with a warning to add the host key to cache. Click “Yes” button to add the host key to cache.
When you’re connected, you will see two fields, one on the left is your PC file directory, the one on the right is your iPhone files/file system. Now, you can easily transfer files between iPhone and computer, just drag & drop the files in WinSCP from your PC to your iPhone and/or from iPhone to your PC. Click on image below to see it in more details