iOS 7 Jailbreak: Enable SSH to localhost with App Store apps
A quick tutorial
I recently jailbroke iOS 7.0.4 and followed my normal procedure of installing OpenSSH and installing Prompt so I could ssh to localhost. (127.0.0.1)
Surprisingly, it didn't work. iSSH didn't work either. Reboot didn't help.
It took me a little while to find the solution so here's a quick write up to make it easier for others. These steps should get you up and running with local SSH using Panic's Prompt client. If you prefer iSSH, it should work similarly.
[edit: See the comments for a fix that doesn't require modifying the ssh client at all. I haven't tested it, but it appears the restriction is on connecting to localhost on ports less than 1024. Thanks miniMe!]
[edit 2: Just wanted to note that this guide may still be helpful for the general process of un-sandboxing an app, or if you don't want to change your ssh port for some reason.]
- Install OpenSSH via Cydia
- Get on the same wifi network as your Mac
- Grab your IP address from Settings -> Wifi -> (i) icon
- Open
Terminal
on your mac andssh root@<your-ip-here>
- Default password is
alpine
. Usepasswd
to change if you haven't yet passwd mobile
to set a login password for themobile
username if you haven't yetcd /var/mobile/Applications
ls ./*/*/Prompt
. This will give you something like./3EE7B167-AF7B-497B-9C8E-EAC96F4AF0D9/Prompt.app/Prompt
mv ./3EE7B167-AF7B-497B-9C8E-EAC96F4AF0D9/Prompt.app /Applications/
(Use your own path, instead of3EE7B167-AF7B-497B-9C8E-EAC96F4AF0D9
)- Go to the home screen of the device and delete the icon for Prompt
- Reboot by holding home and sleep/wake until you see the Apple icon
ssh
back into the device usingssh mobile@<your-ip-here>
. (Use the password you created in step 6.)- Run
uicache
- Go back to the home screen and launch Prompt
- Enter the ip as
127.0.0.1
, usernameroot
ormobile
as per your preference. I useroot
so I don't have tosudo
excessively. - Connect and enjoy a high quality user experience ssh'ing to localhost
Hope this helps someone resolve this issue quicker than I was able to do so. If anyone has suggestions on a better way to do this, I'd love to hear them.
As a side note, I used to use iSSH all the time, but once I tried Prompt I haven't gone back. It has the occasional wart but I like how it generally gets out of the way so I can focus on what I'm trying to do.
Manhattan mobile software engineer.