Forgot my SSH password, now what?

Discussion in 'Jailbreaks and iOS Hacks' started by Anasztasia, Dec 4, 2009.

  1. Anasztasia macrumors newbie

    Dec 4, 2009
    As the tittle suggests, i changed my ssh password and now i forgot what it is, am i in deep ****? what can i do to recover/reset it?
  2. ngenerator macrumors 68000


    May 12, 2009
    USG Ishimura
    Restore, re-jailbreak, reinstall everything. That's the only thing I can think of
  3. loki007420 macrumors member

    Jul 7, 2009
    couldnt you just uninstall SSH and reinstall it?
  4. Anasztasia thread starter macrumors newbie

    Dec 4, 2009
    i read somewhere that reinstalling SSH does nothing to reset the password, and as for complete restore and reJB i guess that would be my very last step when all else fails :(
  5. thelatinist macrumors 603


    Aug 15, 2009
    Connecticut, USA
    The password is not an 'SSH' password. It is the password for the 'root' user account in in the iPhoneOS (which is basically BSD). If you truly cannot remember it, then the only thing to do is restore your phone.
  6. iphonegeek786 macrumors 6502


    Nov 18, 2009
    When you change the passwrd, your changing the password for the whole, the core files of it. The password is not only used for ssh.
  7. ckong macrumors regular

    Nov 12, 2009
    Interesting video. It implies if you have a 3rd party utility on the iPhone that has root access already (in this case iCommander), then you should be able to set permissions on the /private/etc/master.passwd file for all to read/write (0666).

    I just checked and I can access this file with iFile, and edit it...all without knowing the root password. (It least I think I can save it...I hit 'edit' then 'cancel' so I didn't mess myself up.)

    So...the old adage is true. You can break long as you have physical access.

    On Linux, passwords are normally kept in or linked from the /etc/passwd file. It's interesting this video points you to the /private/etc/master.passwd file. There's also a /private/etc/passwd file there too. Before you start hacking away, best to backup any files you're going to edit to a subdirectory. Then, just duplicate the "mobile" accounts password to the "root" over the root password and you should be good to go. If it doesn't work, copy back the file you just mucked with and try another.

    Gotta love iFile. Worth the $4 I paid for it. :)
  8. thelatinist macrumors 603


    Aug 15, 2009
    Connecticut, USA
    Absolutely. It is my most-used jailbreak app.
  9. calvy macrumors 65816

    Sep 17, 2007
    can't you just download mobile terminal and use the passwd command to change the password?
  10. kmiranda macrumors newbie

    Dec 4, 2009
    You need the current password to change to a new password.
  11. ckong macrumors regular

    Nov 12, 2009
    You part.

    Using MobileTerminal logs you with the username "mobile". You'd normally only have ReadOnly rights to the password file.

    That's what the video in the link above was allowing. Using iCommander, the access rights to the master.passwd file were changed so anybody could write to the file.

    So...a combination of the two programs allows you to hack in.

    But...I'm pretty sure this can all be accomplished with just iFile as it seems to have root access to the phone and can edit files directly. (Of course, I haven't ever tested this as I try not to forget my 'root' password. ;) )
  12. DazBrowne macrumors member

    Dec 6, 2009
    The morel of the story is just have one super good password for every thing like mine (78*jsuutyw33) nobody will ever guess that! :D
  13. LeeTom macrumors 68000


    May 31, 2004
    Damn, you were kidding! :)

    Attached Files:

  14. DazBrowne macrumors member

    Dec 6, 2009
    Haha I aint stupid! Its actually password just to let you know !:rolleyes:
  15. iCROLT macrumors newbie

    Dec 21, 2009
    i figured it out!

    i discovered the EASIEST way to get the password back to alpine

    and you can do it in less than 5 minutes! :D

    so, please tell everyone about the video, and comment, subscribe if you have youtube account :D


    btw. hope this helps :D

    PM me about your success
  16. darngooddesign macrumors G3

    Jul 4, 2007
    Atlanta, GA
    I felt like I was watching an old SCTV skit. Please use a tripod.
  17. bytethese macrumors 68030


    Jun 20, 2007
    Cranford, NJ
    I can't see your password, when you type it all I see is ************, but when you see it you see 78*jsuutyw33. Get it? :)

Share This Page