How To: Change Your SSH Root Password On Your iPhone, iPod Touch, iPad [GUIDE]

You may have seen our earlier guide on changing your default password. Here’s a reminder to make sure you do it!

If you’re an avid jailbreaker like us, you’ll no doubt have OpenSSH installed on your iPhone to be able to SSH into it using a desktop client such as CyberDuck. You should also, therefore, appreciate the risk associated with this tweak and the dangers that come with leaving your password at the default alpine setting, purely because it is widely documented.

So, it’s best practise to change it.

First, you’ll need to download MobileTerminal from our very own repo here at iJailbreak. Simply launch Cydia and go into the Manage > Sources > Edit > Add and add our repository URL:

Now search for MobileTerminal and Install it.

iJailbreak Cydia Repository

Once this has downloaded and installed, go ahead and open it up and follow the below instructions at the iPhone-Name:- mobile$ prompt:

  • Type: passwd
  • Enter the old password: alpine
  • You ‘ll then be prompted to enter the new password. You won’t see the characters you type being entered don’t worry.
  • You ‘ll then be prompted to re-enter that new password.
  • You should then be returned to the Mobile$ prompt that you started on when opening the MobileTerminal app.  There ‘s no success message to say the password was changed but if there’s no error message it’s successful. That’s that done for the change for the mobile account.
  • The second primary admin account for the iPhone is called root so it’s necessary to change that as well.
  • Type: login root
  • Enter the old password: alpine
  • Enter: passwd
  • Enter the old password alpine and then enter your desired new password twice, just as you did for the mobile account.

All done! Easy hey? You just increased your security by 10000%!

It should all look like this if you’ve done it correctly:

MobileTerminal iOS

As always, let us know if you have any problems by leaving a comment, or posting in our forums.

If you would like to SSH into your phone, you’ll need a jailbroken phone; check out our guides (PwnageToolSn0wBreezeGreenPois0n) on jailbreaking your iDevice.

Don't forget to follow iJailbreak.com on Facebook, Twitter and Google+. Be sure to check out our partnership page where you can get mentorship on starting your own business online.
  • Dan

    Do you have to change the root password if you don’t have OpenSSH installed??

  • http://twitter.com/btrim14 Dan

    Nope, no need.

  • Zeeshan Ali-pl

    thanks man

  • Zeeshan Ali-pl

    thanks man

  • MistybluQQ

    really appreciate it i couldnt get any other terminal to work on my 3g fw 4.1 THANKS 

  • Dylan W

    thank you, I feel a lot better about the security on my 4s now

  • Derek

    How does not changing SSH Root Password increase your chances of security issues? I did it anyway, and installed OpenSSH. I downloaded Cyberduck. Both Mac and iPhone are connected to wifi but I still can’t access my Mac… Can anyone possibly provide a list of steps for me to follow?

  • Froast

    If you’re on a public network people could SSH directly into your device with cyberduck using the default username and password.