This tutorial is going to be about controlling your iDevice from SSH.
But wait, what the heck is SSH?
SSH is a short word from Secure Shell. It's like a terminal, but the difference is that the terminal executes code on the device it's launched on, but SSH executes code on the device you've SSHed into using WiFi or USB.
So, how do I get SSH on my iDevice?
Well, it's really simple. If you have a jailbreak on iOS 9.3.3 or lower, just open Cydia, search for OpenSSH, and install it. That's it, now you have SSH!
But wait, what if I'm jailbroken with YaluX or extra_recipe? There are two ways to get SSH. Yalu and extra_recipe install SSH to your device by default, but it only works from USB. If you wanna SSH into your device over USB, here's a great tutorial how to use SSH on the YaluX jailbreak via USB.
But wait, you want SSH over WiFi? Ok, this is also easy! Here's a great tutorial about how to SSH into your iDevice over WiFi with the YaluX jailbreak!
So now, the most fun part begins!
We're SSHing into the iDevice. Let's go!
If you're SSHing over USB, the tutorial about SSH over USB on yalu102 is pretty clear.
If you're SSHing over WiFi, I'll explain it here.
SSHing over WiFi
macOS / Linux:
Open terminal
Type ssh root@your-idevice's-ip
It wall ask you for your root password. The default one is alpine. If you didn't change it, it'll be the default one.
Windows:
Download putty
Open the app
Select the connection type SSH
Enter the IP address of your iDevice
Press open
Wait for a few seconds till it asks for the password and enter it. Again, the default one is alpine.
Congratulations, you've SSHed into your iDevice!
Now, let's do stuff. Here are some useful commands:
passwd - changes the SSH access password so hackers can't hse the default one to mess up your device
killall backboardd or killall SpringBoard - resprings your iDevice
reboot - reboots your iDevice
halt - power off your iDevice
But wait, is this all? No it isn't
Let's take real control over our iDevice!
To do this, download this small tool I wrote for controlling your iDevice from SSH (read the description to know how to install it).
So, after you've downloaded nimbus, you can fully control your iDevice from SSH!
In SSH, type nimbus help. You'll see a list of commands which you can enter.
So, let's have some fun!
Open an app on your iDevice. Now type nimbus home. See? The home button press was simulated!
Cool, right? You can look for other commands in the nimbus help list. Looks actually fun, right?