Jump to content

How to Use SSH to Transfer File on iPhone


Recommended Posts

Here is a short guide to show you how you can use SSH on your iPhone and use it to transfer any file to your computer (Mac / Windows). The guide is completely targeted for non-technical persons. 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 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: Please disable autolock 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 your iPhone remotely using WiFi? Now, your iPhone is already enabled with SSH and listens for incoming SSH request. Before you can transfer file from your computer to your 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 20.0.2.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: http://winscp.net/eng/download.php

Installation of WinSCP is very straightforward. Just double-click on winscp421setup.exe and follow the instruction to install it on your PC.

Once the installation is complete, 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 from: http://cyberduck.ch/

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!

Source

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...