If you are new to jailbreaking, you are likely to hear the term SSH thrown around quite a bit. For troubleshooting it’s essential; for everything else it’s very useful.

So what is it? Simply put, it’s an advanced way to connect to the iPhone. Also known for it’s uses in SFTP, IMAPS, POP3S, etc., SSH is a protocol short for Secure Shell that gives us an encrypted and secure tunnel between two devices.

It can be used to remotely send commands as well as transfer files to and from the iPhone and is usually native to all popular desktop operating systems. [Thanks to one of our readers for the refined description]

By default, the iPhone does not have SSH capabilities, but jailbreakers have the option to install the free OpenSSH package via Cydia. Once you do that, you will be able to login to SSH as either “root” or “mobile” (for a user name) with a default password of “alpine”.

To connect via SSH, you can use either a command prompt (Terminal.app on the Mac, or Start>Run>”cmd” on Windows; if you’re using Linux then you probably already know). Find out the local network address of your iPhone in Settings>Wi-Fi, touch the blue arrow next to your wi-fi network name, and you’ll see IP address.

At the prompt on your computer, type “ssh root@192.168.1.5” replacing the numbers with whatever IP address you found. You will be prompted for the default password. Now you’re in.

If you intend to actually run commands through the command prompt, you will need to install APT 0.7 Strict via Cydia. For examples of things you can do, check out this site.

Most times, you’ll never need to do this, but it’s good to know that how. For just getting files to and from the iPhone, you can use a user-friendly FTP app for your desktop such as Cyberduck for Mac or WinSCP for Windows.

When entering details for the connection, just remember these details:

  • Host/Server: the IP address of your iPhone
  • Username: root
  • Password: alpine (it may not ask for a password until you connect)
  • Protocol/Connection type: SSH/S-FTP/Secure FTP
  • Port: 22

Once you connect, you’ll see all the folders on your iPhone. As a rule of thumb, don’t tinker, change anything, or delete anything unless you’re absolutely sure you know what you’re doing. For more info check out this great article.

If this helps, let me know. If I left anything out, feel free to tell me in the comments.

  • Derrick

    I find too many people install ssh when it’s not even needed. Or used

    Why not just use ifile and a file browser for the desktop? If there are benefits I’m unaware of please inform me

    • iFile and a file browser are definitely good and easy to use. I like SSH because I’m a bit of a speed demon. The Terminal loads up faster, and I can type commands in faster, as well as drag and drop commands from a website into the prompt (such as “~/Desktop/redsn0w.app –args -j -i ~/Documents/Firmware/ios-build-name-restore-#####.ipsw”). I do use the file browsers from time to time, since GUIs are nice, but they’re definitely a little bit slower.

      Plus in the terminal, you can just type “respring” or type apt-get or dpkg commands to install/uninstall/update without launching Cydia (since that’s what Cydia is doing anyway in that Installing screen). If you cannot open Cydia for any reason, SSH is turned on at iOS boot automatically, and that may be the only option for some solutions.

  • Op

    Agreed. I use iFile.

  • Me

    Erm, SSH is not also known as SFTP. They are 2 completely different protocols. SFTP is just normal FTP running through an SSH tunnel. This is because original FTP passed all data in cleartext, so anyone running a packet sniffer on the network would be able to not only see your log on credentials in cleartext, but also all traffic between you and the server, allowing the sniffer to rebuild the file you transfered.

    FTPS was an improvement, but only encrypted the logon credentials, it was still possible to rebuild the file.

    By opening an encrypted SSH tunnel and then passing the FTP commands through that, it is impossible to gain any information about the files, commands or logons being passed across the network.

    It is also possible to pass many other commands through an SSH tunnel, including all webbrowser, all your email, and SSH is definitely not also called IMAPS or POP3S just because it supports that functionality.

    • I agree with you. I didn’t get technical at all, and didn’t really do my homework, but through past jobs I know enough to say they are not the same thing at all. I just didn’t want to confuse people, so as far as iPhone network access goes, I figured it would be easier to pickup if I lumped a few terms together. I like your reasoning on the IMAPS/POP3S analogy, made me chuckle about my ignorance to the differentiation. I will be making this change, creditit to you, if you don’t mind.

      • me

        I’ve just come back to this from last night, and rereading it, I think I may have come off slightly hostile, this definitely wasn’t intended it was just a long weekend 🙂

        The article now reads much better in my opinion and thanks for the credit. I wasn’t really trying to call you out on article correctness, merely trying to point you in the right direction, which thankfully you seem to realised; and I definitely agree about putting a few uses together helps understanding, it gives people more to look up on Wikipedia and to work out what it’s doing in common between them.

        It’s still not ‘quite’ correct technically speaking, but I understand that this article was written more for beginners and I think from their perspective it’s actually spot on.
        And I don’t seem to have said it yesterday, apologies: Nice article.

  • burdie

    Ssh is good when you want to install apps bypasing itunes via installous. I use ifunbox, no need to key in command

  • Me 2. IFile is simply the best

  • If you install SSH, be sure to change the default passwords. If you don’t do this, you may discover one day that your phone is part of a botnet.

  • I use iFile too. the best

  • Kristen

    Ok I’m like the poster child for iPhone for dummies but ok I had my phone crash coz I was “curious” on cydia and it left me no service couldn’t call nothin .. Went on wifi went into cydia and fixed that but then I went and downloaded some thing from cydia: watch any episode south pArk for free, after that finished installing and I opened it I web to open cydia again abd It sometimes will just go black and close and back to homescreen but usually it will go to the main loadin page for about 3-4 seconds then crash an go back to homescreen. Now I don have access to my laptop at the current time but could borrow my friends… But like I said iPhones for dummies so does someone have the patience to step by step me beginning with Open SSH etc , and if there is any ways to do it directly from my iPhone even if cydia won’t open? If it helps it’s ab iPhone 3g and I think it’s 3.1.3 and I’m with telus if that matters. Anyways please someone help me I hate not having my cydia running! Please help coz j have the idea on what to do but I don’t m kw what I even have or not like the SSH for example, thank yiu please and iwoukd appreciate it so much. – Kristen