Forgot my SSH password, now what?

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

  1. macrumors newbie

    Joined:
    Dec 4, 2009
    #1
    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. macrumors 68000

    ngenerator

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

    Joined:
    Jul 7, 2009
    Location:
    Detroit
    #3
    couldnt you just uninstall SSH and reinstall it?
     
  4. thread starter macrumors newbie

    Joined:
    Dec 4, 2009
    #4
    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. macrumors 603

    thelatinist

    Joined:
    Aug 15, 2009
    Location:
    Connecticut, USA
    #5
    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. macrumors 6502

    iphonegeek786

    Joined:
    Nov 18, 2009
    #6
    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. macrumors regular

    Joined:
    Jun 23, 2009
    Location:
    London, UK
  8. macrumors regular

    Joined:
    Nov 12, 2009
    #8
    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 in...so 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. :)
     
  9. macrumors 603

    thelatinist

    Joined:
    Aug 15, 2009
    Location:
    Connecticut, USA
    #9
    Absolutely. It is my most-used jailbreak app.
     
  10. macrumors 65816

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

    Joined:
    Dec 4, 2009
    #11
    You need the current password to change to a new password.
     
  12. macrumors regular

    Joined:
    Nov 12, 2009
    #12
    You can...in 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. ;) )
     
  13. macrumors member

    Joined:
    Dec 6, 2009
    #13
    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
     
  14. macrumors 68000

    LeeTom

    Joined:
    May 31, 2004
    #14
    Damn, you were kidding! :)
     

    Attached Files:

  15. macrumors member

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

    Joined:
    Dec 21, 2009
    #16
    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

    http://www.youtube.com/watch?v=wzDB52lKlc8

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

    thanks

    btw. hope this helps :D

    PM me about your success
     
  17. macrumors G3

    Joined:
    Jul 4, 2007
    Location:
    Atlanta, GA
    #17
    I felt like I was watching an old SCTV skit. Please use a tripod.
     
  18. macrumors 68030

    bytethese

    Joined:
    Jun 20, 2007
    Location:
    Cranford, NJ
    #18
    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