June 20, 2024

How to Change the Root SSH Password on Your iPhone

Posted November 2, 2009 at 10:15pm by iClarified
These are instructions on how to change the root SSH password on your jailbroken iPhone or iPod touch. This password is required when using SSH to connect to your device.

Step One
If you do not already have MobileTerminal installed please follow these instructions to install it.

Step Two
Press to launch MobileTerminal from your iPhone Springboard.
How to Change the Root SSH Password on Your iPhone

Step Three
Input su into the terminal window then press the return key.
How to Change the Root SSH Password on Your iPhone

Step Four
You will be asked to input the current root user password. Input alpine then press the return key.
How to Change the Root SSH Password on Your iPhone

Step Five
Once you have logged in as the root user input passwd into the terminal window then press the return key.
How to Change the Root SSH Password on Your iPhone

You will be prompted for new password. Input a password of your choice then press the return key.
How to Change the Root SSH Password on Your iPhone

You will be asked to retype the new password. Do this, then press the return key to finalize your change.
How to Change the Root SSH Password on Your iPhone How to Change the Root SSH Password on Your iPhone
Add Comment
Would you like to be notified when someone replies or adds a new comment?
Yes (All Threads)
Yes (This Thread Only)
iClarified Icon
Would you like to be notified when we post a new Apple news article or tutorial?
Comments (26)
You must login or register to add a comment...
corrupted.dll - September 18, 2010 at 10:53am
When I click on the Terminal icon, Terminal opens for about a second and shots down again. I tried reinstalling and it keeps behaving exactly as I described above. Any ideas?
vaggoz - December 23, 2010 at 3:33pm
You probably have iPhone 4 and iOS4... I also had this problem. Here is the solution: remove it, then install the beta package from xSellize (X Apps) under the name of "MobileTerminal iOS4" (search it on Cydia).
Jennah - September 21, 2012 at 10:11am
That's a smart answer to a tirkcy question
Rival - September 23, 2012 at 3:51am
This is the ideal awsner. Everyone should read this
dunkhills - December 16, 2009 at 4:52am
gosh.. ever since i changed both passwords. Im not able to log into my hotmail or yahoo mail or anything that requires login and password using iphone safari. Help!!!!!
DistortedLoop - December 16, 2009 at 9:38am
Something else is wrong. Changing your root/mobile passwords should not effect web service logins.
dunk - January 5, 2010 at 7:47am
yep. found out later.. solved at safari settings. ahah.. thanks
Ben - November 29, 2009 at 6:43pm
If I forgot my password, is the only way to reset it to restore my phone? I already tried reinstalling Open SSH. I THOUGHT that I knew my password but it's not letting me in, so I just need to reset the password to alpine. Any way of doing this without having to restore?
Resty - September 20, 2012 at 8:26pm
Do these if you are stick at purple sceern If you are stuck at the purple sceern, do these steps!!! (Only on 3GS or 4) 1) put your iphone to Airplane mode. 2) Go to -> Setting -> safari -> Cookies -> Accept. 3) Double tap home button. 4) Press and hold to quit safari (in multitask mode) 5) Clear all Cache n cookies. 6) Open safari and go to jailbreakme.modmyi.com 7) If cannot, Repeat!
coc_21 - November 27, 2009 at 4:53pm
after you change the ssh password, how do u install apps from cydia?
DistortedLoop - November 28, 2009 at 10:29am
Changing your ssh password has no impact on how you install apps from Cydia, or any other source.
Michael - November 24, 2009 at 6:43am
Thanks, with all the news of worms this tutorial helps ease my fears.
Rio - September 21, 2012 at 5:15pm
I really couldn't ask for more from this aritlce.
Alonzo - September 23, 2012 at 5:18am
That's what we've all been waiting for! Great ptosing!
DistortedLoop - November 11, 2009 at 7:47pm
This isn't good enough. You also need to change the password for the 'mobile' account, or you're still vulnerable to information theft.
chris - November 12, 2009 at 3:28am
could you describe or clarify this? where and how should I change the Mobile passwd?
DistortedLoop - November 12, 2009 at 9:02am
clarification: The iPhone has two accounts, the 'root' or master admin account, and the 'mobile' or user account. The 'mobile' account has access via ssh to all of your personal data like email, sms, contacts, etc. How to change: Pretty simple. Notice in the instructions above that when you first open Terminal on the iPhone, you're logged in as 'mobile' already, you can tell by the name before the $ on the prompt. Before you follow iClairified's instructions in the guide, just enter the command passwd to change it for 'mobile', then you can do the 'su' command to change to 'root' to change that password.
galactus - November 12, 2009 at 2:41pm
Thanks dude nice easy instructions and I'm all safe :-)
Chris - November 12, 2009 at 6:55pm
Thx a lot
Johnbull - November 14, 2009 at 7:49am
Hi DistortedLoop, what should I do if I followed iclarified's instructions before I got to see your advice? Thx.
Chris - November 14, 2009 at 8:06am
What i did (i think) is: open terminal (there i found what i previously typed) thouched the screen and pressed 'clear' then 'quit'. Then i restarted terminal and found it back to it's original state. I was then able to follow the instructions hope i'm right;-)
DistortedLoop - November 14, 2009 at 8:30am
@johnbull - what Chris did will work, but you can also just type 'exit' to get out of su mode, at which point you'll be back as the 'mobile' user. Or, while in 'root' mode, you could also type 'passwd mobile' and follow the prompts. Best, in my opinion to get out of 'root' mode the sooner the better, so you don't do any accidental damage to the system.
T - November 3, 2009 at 5:39am
Does this password reset to default if phone restored?
DistortedLoop - November 12, 2009 at 8:58am
Yes, EVERY time you restore the firmware, whether to Apple OEM or Pwned, the password(s) are reset to 'alpine'.
Reza - November 2, 2009 at 10:24pm
What is that iClarified App?
B - November 2, 2009 at 10:59pm
A bookmark to the website, saved to the springboard.
Recent. Read the latest Apple News.
Tutorials. Help is here.
Where to Download macOS Monterey
Where to Download macOS Ventura
AppleTV Firmware Download Locations
Where To Download iPad Firmware Files From
Where To Download iPhone Firmware Files From
Deals. Save on Apple devices and accessories.