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.

  • john

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

  • Justin

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

  • furfree

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

  • Enemy07

    cydia:manage: sources: edit: add:

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

    go through same steps listed as above.

  • Sahanatrymytech

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

  • salsaman

    Worked for me, thanks!

  • b0mbjack

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

  • Idkjhjuj

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

  • EagleyeSmith

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

  • chrimux

    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”.

  • annamagtrends

    Thanks… :) helped…

  • ??????? ??????

    thanks a lot

  • Stewart NFS

    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).

  • kc

    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:

  • Jackdaniels

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

  • Jack P.

    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)

  • Ilya Ershov

    Thank You!

  • Ashish Rai

    Thanks a lot 

  • Jason M Rice

    How do I change the user password?

  • John Kus

    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 ……….

  • Matthew Nicholas Kennedy

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