How To: Change Your iPhone’s Default SSH Password



If you jailbreak your iPhone, the first thing you ABSOLUTELY MUST DO is change the default filesystem password.

When you jailbreak, the filesystem’s password is set to the common password “alpine.” As people usually don’t bother changing this password after performing a jailbreak, it’s really easy for hackers to get access to any jailbroken iPhone/iPod Touch on a public network.

EDIT: Just confirmed with GeoHot and it seems that at least blackra1n doesn’t install SSH by default, therefore this should not be a problem if you used blackra1n to jailbreak, unless you installed the OpenSSH package from Cydia.

An Australian hacker called Ashley Towns demonstrated this by circulating the first known iPhone worm, known as Ikee, which replaces your lockscreen wallpaper with an image of Rick Astley. Luckily Town’s Rickrolling is benign. He wrote the worm to demonstrate how easy it is to break into jailbroken iPhones.

Changing the password is quick and easy — after the jump is a tutorial showing how to change the SSH password.

Note: There is no need to follow this guide if you haven’t jailbroken your iPhone/iPod Touch.


Jailbroken iPhone / iPod Touch

Here’s how to change the default SSH password after jailbreaking:


1. Make sure you have Cydia installed on your jailbroken device. If you don’t already have MobileTerminal installed, launch Cydia and tap the ‘Search’ tab in the bottom navigation bar.






2. Type ‘MobileTerminal’ in the search field and select the first result. Select ‘Install’ on the top right corner and tap ‘Confirm’ on the next screen. It will now install MobileTerminal on your device. Now, tap on ‘Return to Cydia’ and tap home button.


3. Navigate to the newly installed ‘MobileTerminal’ application and tap to open.




4. In MobileTerminal, type ‘su root’ and tap return. It will ask you for a password, enter ‘alpine’ and tap return again.





5. Now, type ‘passwd’ and then tap return. Type in a new password such as ‘secret’ and tap return. Retype the new password to confirm and then tap return one last time to change the password.

6. Now, your SSH password will be changed and your device will be protected against any future hacks that use SSH to access your device.

Deals of the Day

114 responses to “How To: Change Your iPhone’s Default SSH Password”

  1. john says:

    For me, it’s launching then shutting down immediately.

  2. Justin says:

    you need to download the new moble terminal from… for it to work. The one on Cydia doesn’t work with newer devices

  3. furfree says:

    try to download it from the xsellize source, ( direct to the phone.

  4. Enemy07 says:

    cydia:manage: sources: edit: add:

    search: mobileterminal: click first one (Not UKIT based one)

    go through same steps listed as above.

  5. Sahanatrymytech says:

    i Tried but i am getting some problem in it restarts again and again

  6. salsaman says:

    Worked for me, thanks!

  7. b0mbjack says:

    if it’s crashing try downloading Mobile Terminal (iOS4) – worked for me. thanks for the article.

  8. Idkjhjuj says:

    load from xsellize on cydia and it worked first time! Thanks

  9. EagleyeSmith says:

    So, I’m confused, if you jailbreak you iPhone, do you have to change your password? Or is it only if you install OpenSSH?

  10. chrimux says:

    usually root is never enabled on apple devices (except for mac os x server). if you jailbreak your iphone, this process also enables root and sets the root password to “alpine”. (and apparently also the password for user “mobile”)
    You need ssh to get a command line into the os which enables you to change the root password on your jailbroken device to something else but “alpine”.

  11. annamagtrends says:

    Thanks… :) helped…

  12. ??????? ?????? says:

    thanks a lot

  13. Stewart NFS says:

    I just got Terminal from there and now when I go to remove it it crashes when it gets to “M” in packages.

    EDIT: Ah nvm I had removed the source first… It’s fine now. (Remember I just started literally 10 minutes ago).

  14. kc says:

    If you cannot run the MobileTerminal app (it doesn’t really work well on iOS3+), then you can reset your password from your computer. Also, be sure to have installed OpenSSH from Cydia otherwise it won’t work either. The following link provides instructions about how to change your password:

  15. Jackdaniels says:

    It is now SU > ‘current password’
    then reset it with ‘passwd’

  16. Jack P. says:

    Go to
    Download iFunBox
    Go to SSH Terminal
    type in passwd
    Type in your new password
    Type it again
    You’re done! If you wanna test just to make sure, launch your SSH client (CuteSSH, WinSCP, CyberDuck)

  17. Ilya Ershov says:

    Thank You!

  18. Ashish Rai says:

    Thanks a lot 

  19. Jason M Rice says:

    How do I change the user password?

  20. John Kus says:

    One easy and safe way to change the root AND the mobile password on newer ios devices ,where newer = > ios 4 , is : , just did it and it works fine on my iphone 4 – ios 5.1 ……….

  21. Matthew Nicholas Kennedy says:

    this worked out great for me. First time no problems simple and easy thanks a lot.

Leave a Reply

Your email address will not be published. Required fields are marked *