Change the iPhones Default Root Password

Sep 10, 2011 - 2 Comments

Change the iPhone 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:
  • ssh root@device.ip.address

  • Enter the default password when asked, it is: alpine
  • After you are logged in, type:
  • passwd

  • 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:

passwd mobile

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.

.

Related articles:

Posted by: William Pearson in Command Line, iPhone, Tips & Tricks

2 Comments

» Comments RSS Feed

  1. […] the quotes, just like all iPads, iPhones, and iPods. It will be “alpine” unless you changed it at some […]

  2. Valashtar says:

    While this is excellent advice, its a little misleading. MobileTerminal is not an SSH server, it’s an SSH client. The only package that matters is OpenSSH.

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site