Home > Tips & Tricks, Tutorials > How to Trasfer Files FROM and TO the iPhone Using SSH (Windows)

How to Trasfer Files FROM and TO the iPhone Using SSH (Windows)

October 1st, 2009


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.

photophoto 2

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

photo 3

NOTE: Connect your PC to the iPhone via WinSCP

winscpFor 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


  1. shashank
    November 10th, 2009 at 22:47 | #1

    thanks for this how to thread
    i would like to ask when i was searching for this in cydia i came through


    isnt this better than the open ssh as it continually reconnects an ssh session
    so we dont face the problem – “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”

  2. Khurram Fazal
    December 7th, 2009 at 00:00 | #2

    My cydia is not working and I have not installed openSSH… what do i do now?

  3. niti
    January 1st, 2010 at 10:51 | #3

    Khurram Fazal :My cydia is not working and I have not installed openSSH… what do i do now?

    I have same problem please ca somebody tell me hot to fix this problem?

  4. trumpeteer10
    January 28th, 2010 at 00:54 | #4

    I have the same problem!! please help i would like to be able to use cydia again.@niti

  5. 2haven
    September 30th, 2010 at 22:31 | #5

    i have a problem too!when i try connecting winscp gives an error saying “server unexpectedly close network connection”

  6. yerfenuj
    October 22nd, 2010 at 10:40 | #6

    Hey Mr. maxski im curious on changing the password using mobile terminal. once that ive changed it to the password of my choice im currently safe on pending viruses and hacking my iphone. Now my question is:

    When connecting my pc to the iphone via winscp do i need to be in wifi?
    When i use winscp what username and password shall i use? any help will be appreciated thank.

  7. October 22nd, 2010 at 11:19 | #7

    Hi there,

    Yes you will have to be on WiFi / Your Wireless network with your iPhone.
    When you use WinSCP you will use the “root” as the username and the password would be “alpine” if you have not changed it yet or any other password you have picked (if you have changed your password).

    Good Luck

  8. yerfenuj
    October 22nd, 2010 at 19:59 | #8

    Thank u very much mr. maxski :smile:

  9. Aaron
    October 29th, 2010 at 18:21 | #9

    Mr. Maxski when you took the pictures of the WinSCP were they an older version because they look slightly different then what I had on my computer? Also does this work on the iPhone 3GS? Thank you

  10. Methadras
    November 15th, 2010 at 01:18 | #10

    Hi all. Love the site and I’m learning tons. Quick question. I saw an alternative to WinSCP called DiskAid from DigiDna that allows you to get to the directory structure on the iphone. It isn’t free, but is this an alternative to WinSCP to move files around? Also, am I to assume that WinSCP allows the console session window to execute the .deb file that DiskAid woudn’t? Thanks for any help.

  11. Jefferson
    November 18th, 2010 at 08:35 | #11

    Thank you for this post, it helped me learn a lot. The step-by-step guide is really clear and easy to follow.

    I have a quick, very basic question: If I want to move music files from my PC to the iPhone, which folder should I move them to?

    Sorry if this seems such a basic question, I’m new to the iPhone and to jailbreaking. This site has honestly been the best resource I’ve found on the net on this subject.

    Thank you, and please keep up the good work!

  12. ziva
    November 25th, 2010 at 12:26 | #12

    thank you for this how to,
    I have a question,
    there is any ssh client for win7 64-bits?

  13. January 19th, 2011 at 01:43 | #13
  14. Michael
    April 24th, 2011 at 21:39 | #14

    I am trying to instole Frash to my iphone 4; when I am trying to use win scp it give me error:
    connection timed out. I never able to connect.
    Could you please help

  15. Triano
    June 12th, 2011 at 14:22 | #15

    When i press login, the program wont react and then says that the connection is timed out. Help would be much appreciated

  16. mohsen
    August 24th, 2011 at 04:32 | #16

    thanks alot from luxembourg

  17. quinton
    August 25th, 2011 at 01:14 | #17

    Hi thr,

    Iv downloaded the app and followed the steps which are pretty straight forward… But ever time i try to connect my phone it says “server unexpectedly closed network connection”… At the moment i dont know what to do.. Could someone please help me!!

    Thanx in advance

  18. mohsen
    August 25th, 2011 at 14:34 | #18

    but second time i have the same problen network error connection time out

Comments are closed.