localhost SSH access to a jailbroken ipad

After upgrading to IOS 7, I wanted to be able to ssh onto the device using a locally installed ssh client (i use iSSH).

This wasn't possible... I kept getting an error "Fatal Error Operation not permitted".

Found a very useful article here: http://blog.funroll.co/ios-7-jailbreak-enable-ssh-to-localhost

Here is the list of commands I ran to sort things out.

------------------------------------

Enable wireless on your iPad.
Jump into wireless settings to find out what IP address the iPad received from DHCP.
Make a note of the IP address (I am using 10.0.0.10 in the example below).

You will need to run these command from a desktop/laptop (you can’t do this locally).

# ssh root@10.0.0.10

Now… we should change the password for the root user… as default passwords are bad, OK?

# passwd

For good measure, set the password for the user account called 'mobile'.
# passwd mobile

Now we need to duck into where iTunes/appstore applications are installed:
# cd /var/mobile/Applications/

Having a look… we can see a bunch of useless names…… I had a bunch of randomly assigned names, as seen below.

iPad:/var/mobile/Applications root# ls
00695A0B-216D-4DD9-B45E-B03620AA89B5
7008075F-F06A-4C5E-94E5-C7E285AD8BA3
01AA9EF3-C120-4C2C-BDEC-801058D4EC7A
74F779A9-E362-43AB-A8AF-D1C3633E90C3
0799B6A0-A5C3-44F6-B2A7-C589E29913D4
74FF4AF8-480D-43C8-AB8E-B2698FE75A12
112E676F-4BDD-4C07-ABEF-72D9C0CBC82F
768F5F8A-2D14-42FF-986C-D7A64081E8D7
1321C876-7761-43ED-863A-5263D3BC736A
76BC9222-DF1B-4325-9BB7-CDA5246A8D0C
… etc
2ADF2D59-418C-470D-922C-50FB39FCA813
… etc
B115E66F-7AEC-407D-9C52-E997F522E0EF
2DFE15FC-E1F4-40EA-945C-257635F445B6
6CE0BD12-E62E-46E7-BF91-4740FA0945DE

Output of the command below soon gave away what I was interested in:
# ls ./*/*.* | grep -i ssh
LINUSSharedTableViewController.nib
LINUSShortSocialFooterView.nib
MBProgressHUD.txt
EXP_STATSSHARE.rsg
./2ADF2D59-418C-470D-922C-50FB39FCA813/iSSH.app:
iSSH
isshProducts.plist
sshtunnel.jpg
effect_ink_crosshatch_dark.jpg
effect_ink_crosshatch_light.jpg

Now we move the iSSH application directory to /applications (this bypasses the application sandboxing that prevents you from sshing onto localhost). Note the space before '/Applications/'

# mv /var/mobile/Applications/2ADF2D59-418C-470D-922C-50FB39FCA813/iSSH.app /Applications/

Now we need to run the uicache command as the mobile user:
# su mobile
# uicache