Change the iPhones Default Root Password
If you’re going to run something like OpenSSH or MobileTerminal on your iPhone or iOS device so that you can SSH in to it, you’ll want to change the root password for obvious security reasons. Without doing this, anyone can use the default ‘alpine’ password and connect to the hardware, assuming they know an SSH server is running and have the devices LAN IP address.
Note: this only matters for users who have jailbroken an iOS devices and then are running an active SSH server like MobileTerminal. This is not a necessary procedure for other iPhone or iPad users because no server runs open by default and there is therefore no security risk.
- Launch the Terminal or your preferred SSH client, find the iOS IP address, and connect to the iPhone using SSH with:
- Enter the default password when asked, it is: alpine
- After you are logged in, type:
- Provide a new password, hit return, and confirm the new password when asked
That will cover the root password, but to be safe you’ll also want to change the ‘mobile’ users password as well, you can do this by typing:
Again you’ll want to enter and confirm the new password.
When finished, you can log out of the iOS device by typing “exit”.
The video below walks through the simple process of changing the root passwords by way of SSH:
This is demonstrated on an iPhone 5 with iOS 6.1, but it applies to all other iOS devices and versions.