You can not connect to ssh over wifi with the 10.2 jailbreak. You need to ssh over USB. They are several options but the easiest is to use iproxy. Install iproxy brew install libimobiledevice.
Pushfix App in Cydia Now – Fixes Push Notifications for Hacktivated / Unlocked iPhones. No need to use or install OpenSSH or any other tools (because of that, your phone is more secure). Add a Cydia source, install, and it’s ready. No reboot necessary! Installer OpenSSH sur Cydia; Connectez vous et relever l’adresse IP sur laquelle votre iPhone. Installer Openssh sans cydia, ni wifi. OpenSSH for Windows is a free package that installs a minimal OpenSSH server and client utilities in the Cygwin package.
On the terminal now run the following command. Iproxy 2222 22 This will enable you to forward all traffic from port 2222 to port 22 over USB. Now you can connect to the iPhone by running ssh ssh root@localhost -p 2222 Notice you connect to localhost not the ip address of your phone. If everything went well, you should be presented with the ssh prompt. If it doesnt work, check if ssh is running on the iPhone by running telnet 22 If you cant connect make sure you install the openssh package from Cydia. @Colin Has a great answer for the Yulu jailbreak, but I did things a little differently that may be useful to people.
His answer focuses on creating a new daemon with a new name so that effectively you have two daemons running SSH. One for the USB and one for other TCP connections. I wanted one listener that listened on all interfaces. I was also on Windows and needed something that worked with that, which Galdolf did not. As a result I went with a, which I to make sure it never disappears on me. To use this, run: python usbmuxd pythonclient tcprelay.py -t 22:2222 The above maps local port 2222 to the remote port 22.
Once this is setup you can use your favorite SSH utility in order to connect in. Host: 127.0.0.1. Port: 2222 Default username of 'root' and password of 'alpine', but a username of 'mobile' and a password of 'alpine' can also be used to connect.
NOTE: If you don't know the root password, use Filza to change the permissions of /etc/master.passwd to 666, then via SSH as the mobile user, or utilizing your favorite file editor, edit that file to copy the hash from 'mobile' over to 'root' to make the passwords the same. (The hash for 'alpine' is '/smx7MYTQIi2M', if its needed). You then should be able to login as root then, or use su. Once your logged in you'll want to find the copies of droplist.plist that are currently on your machine. There are probably more efficient ways to do this, but I used the following command: find.
grep dropbear.plist Which yielded:./Library/LaunchDaemons/dropbear.plist./private/var/containers/Bundle/Application/023FF836-8A0A-4593-A578-6801F2A3F34D/yalu102.app/dropbear.plist The first entry is the active daemon, but the second one is more important. Its the daemon that Yulu puts in place every time you run the jailbreak (Which you have to do with every reboot). If you only edit /Library/LaunchDaemons/dropbear.plist, it will be replaced every time you reboot. As a result we're going to edit the one that comes packaged with Yulu, but if you cat the file you'll notice its in a binary PLIST format. To fix this we need in order to get plutil. You can then run: plutil -xml dropbear.plist This will convert the dropbear.plist to XML format.
![For For](http://img-16.ccm2.net/rdycB_qi2f4zVntLqK5d_S_UjS0=/673f2400308c4fa4b6b325e8cde15ae9/ccm-faq/6LhXNXvf-img-0320-s-.png)
Once this is done you can edit the file in any text editor. I used to do the actual editing. Nano dropbear.plist When you're editing the file you want to get rid of the 'localhost:' from the last string entry. This will make the listener run on all interfaces instead of only the loopback interface (Which is only available via USB). As a result your file becomes:
Reboot After a reboot you should be able to SSH utilizing your phone's IP address and the standard port 22. Host: (IP From Settings - WiFi - (WIFI NAME). Port: 22.
After installing FileZilla, run it and connect by entering from the text box (located at the top portion) your iPhone's IP address as host, 'root' as username, 'alpine' for the password, and '22' for the port number. Click on the 'Quickconnect' button and once you are connected, you will now see the files and folders from your iPhone at the right hand corner of FileZilla interface. Now explore and have fun. Changing the root password: It is advisable to change the default root password of your iPhone. Here is how to do it.
Install 'MobileTerminal' package using Cydia. Run or open MobileTerminal. From the MobileTerminal, login as root using 'alpine' as password: iPhone: mobile$ root Password: alpine 4.
Run 'passwd' command and enter you new password twice. IPhone: mobile$ passwd Changing password for root. New password: Retype new password: iPhone: root# Happy hacking!