Transfer files between iPhone and PC

First make sure you have ssh and bsd subsystem installed from installer. Next get WinSCP and find your iPhone‘s ip by going to (on your iphone) settings > Wi-Fi > “Your selected WiFi” > Look under IP AddressConnect to your iPhone using WinSCP (user: root password: alpine) Change File Protocol to SCP

Just press login after your screen on WinScp


Caveat: SSH & iPhone
How to login into your iPhone via SSH with no password (but with key authentification)

Aug 07

Ok, folks. The first part should be know to quite a few people, it will give you a “quick & dirty” short manual how to install a SSH server on your brand new iPhone running Firmware 2.0. As of now the firmware 2.0.1 is not jailbroken, so please do not upgrade to 2.0.1 unless the people at iPhone Dev will tell you.

The second part will give you a quick advice how to secure your new SSH server.

Installing SSH server:

  • Open Cydia on your phone. (If you do not have Cydia installed on your phone you still have to jailbreak your iPhone.)
  • This step could be necessary if you never run Cydia before: Press “Changes” and make sure you install all necessary upgrades that will show up. A newly jailbroken iPhone will have 6 to 8 necessary updates showing up. Make sure you do not upgrade automatically as this gave me quite a lot of problems. Instead start to upgrade the “Cydia Installer” first. Then quit and restart Cydia immediately afterwards. It will take quite a while after the restart to re-arrange everything. DO NOT INTERRUPT this step. Then make sure you upgrade all other packages like APT, Core Utilities, SQLite v3, OpenSSL, Cydia Sources etc.
  • In Cydia, press “Search” and enter “OpenSSH”. Choose the “OpenSSH” package from Teleshoreo and press “Install”
  • Quit Cydia after installing.

Remember: You now have an “up & running” SSH server on your phone. Everyone can connect to your phone using a SSH client and the standard password alpine.

Secure your iPhone SSH server:

  • Make sure your iPhone is connected to you WiFi network.
  • Go to “Settings” , then to “Wi-Fi”
  • Press the round blue button to the right of your connected network
  • It will show you your network settings, make sure you get the “IP Address” – its the address of your iPhone right now.
  • Open your Terminal application
  • type in: ssh -l root (IP-Address of your iPhone)
  • The first time you connect to your iPhone secure keys are generated. This could take up to a minute, so be patient.
  • A password prompt should show up, enter: alpine
  • Now you are on your phone, you should change your password immediately, enter: passwd
  • You will be asked twice for a new password, make sure its not to easy to guess. No, 12345 and password are no good choices :)
  • Now exit the iPhone by typing in: exit

Most tutorials on the web forget about the second standard user your iPhone will have. Actually while root is the most powerfull user there is still user mobile. And this user has enough rights to change about every little apsect of your iPhone. So we should change the standard password for this user as well!

  • On you Terminal application, type in: ssh -l mobile (IP-Address of your iPhone)
  • A password prompt should show up, enter: alpine
  • Enter: passwd
  • Since this is not the root user the system will ask you for your old password first, enter: alpine
  • Then type in your new password twice. As a security measure it should not be the same password as used for the root user!
  • Again, exit by typing: exit

Voila! You SSH server is safe now. Do not forget that it will be always on. So if someone has your current iPhones IP address he will be able to connect to your iPhone. But now the new passwords have to be used to login.

Remember that you have to change the passwords after every firmware upgrade again. Even if you restored from an iTunes backup the passwords for the SSH server will be reset to the standard passwords!

On the next post I will give you some advice how to connect securely from you Mac to your iPhone without having to type in you password.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: