If you ask me the top reason for jailbreaking iPhone, the ability to use SSH to transfer files between iPhone and computer via WiFi is my answer. I believe it’s also one of the reasons why some of you go for the jailbreak. But, as I know, not all the readers are geeks and come from technical background. You may even not heard of SSH until you decide to jailbreak. So, here is a short guide to show you how you can use SSH on iPhone and use it for transfer any files to your computer (Mac / Windows). The guide is completely target for non-technical person. I just want to show you how great SSH is when pairing with iPhone for wireless file transfer. So, you can use it to transfer ringtone and photos without the USB cable.
So, what’s SSH?
The first thing you would like to know is what SSH is. SSH stands for secure shell that is commonly used in Unix/Linux environment. You can use SSH to access a remote a computer and execute commands from another machine that may be miles away. Additionally, you can use it to transfer files to the remote computer, just like FTP. I’m not going to dig deep and throw out all the technical details about SSH. But just remember, SSH is a tool that lets you access machine or devices remotely. Here, the device is your iPhone.
Installing SSH on iPhone
You may be curious why you can use SSH on iPhone. Is SSH just designed for Unix? That’s a good question. You may not know the iPhone OS is a stripped-down version of Mac OS X, which is actually riding on Unix as its core. So, that’s why you can use SSH on iPhone.
But officially, Apple didn’t bundle the utility for every iPhone user and thanks to the jailbreak community to bring SSH to iPhone. As long as your iPhone is jailbroken, you can install and use SSH on iPhone.
To use SSH after jailbreak, you can go up to Cydia and search for “OpenSSH” to find the package. Tap the Install button to install it on your iPhone. Once installed, restart your iPhone. You’ll not find an icon for SSH on the home screen. But after restart, the SSH tool will be automatically launched and listens for remote request in background.

Note: Did you set the auto-lock? Your iPhone should be turned on during the SSH file transfer. So, if you have configured auto-lock, I suggest you to disable it before using SSH. You can go to Settings -> General -> Auto-Lock and set it to Never.
How to Transfer File Using SSH
Okay, here comes to the core part of this guide. How can you transfer file to & from iPhone remotely with WiFi? Now, your iPhone is already enabled with SSH and listens for incoming SSH request. Before you can transfer file from your computer to iPhone, you have to know the IP address of your iPhone.
To check for the IP address, go to “Settings” -> “Wi-Fi”. Tap on the connected WiFi network and view the details. You’ll see the IP address of your iPhone. Say, for my case, the IP address is 10.0.1.5.

Once you know the IP address, the next step is to connect to iPhone from your PC or Mac.
For Windows User
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 here.
Installation of WinSCP is very straightforward. Just double-click on “winscp421setup.exe” and follow the instruction to install it on your PC.
Once complete the installation, launch WinSCP and click “New” to connect to iPhone. In host name, type in the IP address of your iPhone. For user name and password, you can use “root” and “alpine” respectively. Keep other fields unchanged. You can then click “Login” to start making connection with your iPhone. Click “Yes” if you’re prompted with a warning to add the host key to cache.
Tip: Instead of clicking “Login” directly, you can click “Save…” to save the connection profile for future use


When connected, you’ll see the files in iPhone file system. And, you can easily transfer files between iPhone and computer by just drag & drop the files in WinSCP.

For Mac User
Mac is SSH-friendly. There is already a SSH client bundled inside Mac OS X. But you can only use it in command mode only as it does not offer a graphical interface. So, I highly recommend you to download a free SSH client called “Cyberduck” to connect to iPhone. You can download Cyberduck via this direct link or via its homepage.
To transfer files to iPhone, simply launch Cyberduck and click “Open Connection”. Then fill in your iPhone’s IP address in “Server” field. And use “root” and “alpine” for user and password respectively.

Next, click “Connect” button to connect to iPhone. And, Cyberduck will start establishing connection with your iPhone.
Make sure your iPhone is turned on. Otherwise, your Mac will fail to make the connection.
Once connected, you’ll see the folder list of your iPhone file system. You’re free to navigate through the file system. To download file from iPhone, just right-click on any file you want to download and select “Download To..” to retrieve the file. And, to transfer file back to iPhone, simply go to the destination folder and right-click to select “Upload”. That’s it!

Further Information
I hope this guide is helpful for you and you can find SSH useful for iPhone. Now, to further enjoy the benefit of SSH, you can check out the following guides:
Do you find any problem with SSH? Feel free to leave comment and share your experience.
WARNING: It’s highly recommended you follow this guide to secure your jailbroken iPhone (with SSH enabled) from virus attack!
Share with Your FriendsWhat's Next?
If you find the post is useful, subscribe to Simon Blog using RSS or Email to get free iPhone updates. Alternatively, you can follow me on Twitter or join us on Facebook.
Related Post you'll like:- Transfer Photos from iPhone wirelessly using SSH
- Transfer Ringtone to iPhone wirelessly with SSH
- Netatalk lets you transfer files between iPhone and your Mac wirelessly
- How to Enable EDGE/APN Editing on Jailbroken iPhone
- DiskAid: Transfer Files between iPhone & Computer via USB









{ 3 trackbacks }
{ 31 comments… read them below or add one }
hi…… and how do you change permissions for the files??? (ex. 777etc..)
@Javier Gil
Yo! Right click on the file, scroll down to properties/CHMOD. Once clicked, a new window will open up and u will see permissions [xxxx] Change the permissions to correct number and hit apply or ok.
Good job on the How To Simon!
Hey Simon, thanks for the great how-to. However, I think it’s still too difficult for most ppl. I tried SSh my iphone once when I first jailbreak it but I got tired of the tedious process.
There’s a simple solution to this. I dont know if you ever heard of “iphonebrowser.” It’s a great opensource app that lets you access your iphone sans all the setups that are required for SSH.
Pros:
Plug, Run and Play. No more preliminary steps.
Fast transfer speed (over USB cable)
Easy for everyone, no need to write a guide for it.
Preset Directories: Wallpapers, Pictures, DCIM photo, UI Sounds, Ringtones, Theme folder etc.
Cons:
No wireless transfer (must use USB cable)
changing permission? (I never change permission so I dont know if it’s there or not)
Let me know if you find Iphonebrowser worthy.
I forgot one best Pro:
you get to access/transfer files in the background even when the phone is locked. How cool is that.
Hi Simon,
After upgrade, jail break and unlock i am not able to install openSSH, installer, video recorder is installed but not able to open it and not able to load lots of applications which was there already.
As well as could you please reply me i am getting lots of error messages while installing any kind of application.
Regards
Sam
Me too. Just like sam. I’m getting error messages for almost anything I try to dl and install form cydia. Even some essential updates it says I should dl or else I’m going to have problems. Particularly for SSH it gives me a “couldn’t configure pre-depend dpkg for ncurses, probably a dependency cycle” error. Any help or ideas? Thanks…
i did exactly as you wrote but i end up with network connection time out?
any ideas on how to fix this?
@Nicole, looks like your iPhone is not enabled with SSH. If you’re sure you have installed OpenSSH, try to restart your iPhone and try again.
“You may be curious why you can use SSH on iPhone. Is SSH just designed for Unix?”
Many LOLS…
SSH is a protocol. It has NOTHING to do with UNIX/LINUX. It is the secure replacement for Telnet. Like any protocol it is used for communication and is not OS specific, even though most bare bones Linux kernels support it. I realize you’re trying to dumb this down for the average Mac users (read people who can’t use a toaster sans epic fail unless Steve Job’s puts an i in front of it).
While I have an iPhone, the first thing I did was jailbreak it. One thing I couldn’t stand about Apple in the 1980’s and now is their insane level of control over everything you can do on your Mac/iPhone/iPod. It’s ridiculous, and they’ll never change. They’re like the “Pied Piper” stringing people along with promises of a better experience as long as you assimilate to their domination which is why the Linux/Windows market will always prevail. Linux may be a bit behind the curve in friendliness, and Windows has struggled, but both are catching up to Macs, especially Windows with the WPF initiative.
Hi .need help .have a 3gs. Have one pc with xp professionel where my iphone can wifi connect with winscp and openssh and ex internet explorer and discover app but a vista and xp home edition where nothing works but my old first generation works with all pc. What are my two computers missing to be able to communicate with my 3gs?
@Claus, to use SSH for file transfer, you need to jailbreak your iPhone 3GS first. So, are you using jailbroken iPhone? If yes, you can install OpenSSH via cydia and then transfer file via SSH.
Hi simon. Thank you for answering. I know that and is jailbroken like my first generation iphonw. But the new 3gs do not reply always maybe one in 100 atemts. Grt timeout. Also with cable and tunnel program. Also no reply when use free ftp apps like discover and try to contact with filezille or IE. Like my phone wont answer. If i am lucky an get connection the wifi is extremly slow or the connection stops short after with time out . Turned off autolock and installed keep wake no improvement. There is no iphone support here in denmark and have had it to repair but they said nothing wrong. I do not know what to do. Can use wifi and can easily downloadand stream also from my own media server. Itseems that it is only when my iphone my reply there is problem and suddently it works but very very slow few kb pr sec. But iphone browser i found on internet works perfect with cable on all my pc but i dont think the phone need reply with this. Sorry i am a noob and not good with this why it might sound strange when i tri to explain. Claus
@Claus, did you try to reset the network setting? You may check out this post and see if it can resolve your wifi issue.
hi what do i download on to my i phone once i have jaol broke it so i can get free apps on it.
Google.com
That is way off topic for how to SSH and I don’t believe Simon would prefer that to be discussed here.
Use the App Store and support devs to get your downloads for apps and games!!!!!!!!
O ya, its also called Jailbreak, Jailbreaking or Jailbroke iPhone for helping u on ur searches
Nobody thathas experiances what i wrote two days ago? 3gs with 3.01. anyone know a website that might help with issues where things just not work? I need more than a recipe for how it should work. Need some expert advice andno one here in denmark. Just blogs which again shows how it should work no experts when there are problems. Hope for some assistance.
Have reset and restored Multple times and downgraded to 3.0. No change at all.
hi. i used this tutorial to transfer a .pdf into my iphone. everything went fine. but when i went to open this file via fileviewer, which i got from cydia, i get this:
error:
operation could not be completed.
(webkiterrordomain error 101.)
anybody know how i can open and view this .pdf on my iphone?
thanks.
@Chris, you can download “File Share” or “Good Reader” from App Store. Both applications can let you read PDF on iPhone.
oh yeah…it’s a 2g with 3.0 firmware.
thanks a bunch simon ng. much appreciated.
А если посмотреть на это с другой точки зрения то не все так гладко получается
Have a jailbroken iphone 2g 2.1 .. i don’t seem to be able to connect thru ssh using winscp or putty.. it tells me “software cause connection to abort” .. Have tried using wifi and via USB as well .. further am using itunes 9 ..
I have installed openSSH on the iphone 2g and ssh is active on it.. further I have the IP of the phone correctly
PLS HELP ..maninder
hi !!! i have a mac… how do i change the permissions ?
Please, please, please append the post to warn people that they should change their passwords for both accounts (root and mobile) after installing SSH. Again (not for the first time) someone has broken into a range of iPhones over the 3G network, using the default password: see http://arstechnica.com/apple/news/2009/11/dutch-hacker-holds-jailbroken-iphones-hostage-for-5.ars
Unfortunately, most SSH tutorials fail to mention this. Yours is one of the first to turn up in a Google search for ‘SSH iPhone’, so it’s important that you warn your readers.
@Jim, thanks for your suggestion. Now it’s advised to follow this guide to secure the jailbroken iPhone once SSH is enabled.
Speaking of changing the SSH password, in Cydia, there is a nice step by step tutorial. Go to the main menu, scroll down, go to “OpenSSH Access How-To”.
Follow the steps if you haven’t already installed SSH. If you have, then scroll down, and there’s another arrow taking you to “Change default password.” And follow those instructions.
Alternatively, install OpenSSH.
Get your iPhone’s ip address
Open Terminal
Login to your iPhone using “ssh root@
Accept the host key if you are asked
login with password “alpine”
type “passwd”
you will be asked for a new password, but the cursor won’t respond as you type in, so be careful.
you will be asked to repeat the password. again, be careful
all done
@Doug, thanks for the great tips!
Another Thanks for the know-how show-how! This is great and again your directions are right on!! Thanks again!!
jim frogge in NC!
Heyy thanks for the tutorial but i jsut have a problem
i have a jail broken iphone 3gs with a wifi connection at home
and i have tried doing the sssh root@(ip-address) thing on “Terminal” on the iphone and it will connect like that but when i do it with WinSCP on my windows Vista Computer it always says that the connect was time-out and i have installed openssh because i can see in both icy and cydia that the program is installed but when i robooted my iphone no ssh program or anything opened up so im very confused
any help please?
Thanks alot in advance
Best Regards Sina