how to change ssh pw?

Discussion in 'Jailbreaks and iOS Hacks' started by genetic, Jul 27, 2009.

  1. genetic macrumors 6502

    Jul 15, 2008
    how would i go about doing this. im currently using winscp to access my phones files. would i be able to do it from there? thanks in advance
  2. MadGoat macrumors 65816


    Jul 30, 2007
    If you mean your root password "alpine" ... don't !
  3. dhlizard macrumors G4


    Mar 16, 2009
    The Jailbreak Community
    Why ??? :confused:

    I'll look for a future thread from you with the word "HELP" in the title.
  4. Diseal3 macrumors 65816

    Jun 29, 2008
    <Passwd root> I will ask for your old and new password twice i believe.
  5. genetic thread starter macrumors 6502

    Jul 15, 2008
    i do mean my root pw. may i ask why?
  6. tag macrumors 6502a


    Apr 29, 2005
    I don't see why not, just do not forget it. Seriously, do not forget it. Changing the default passwords for either root or mobile doesn't seem to have any affect on any apps or installations.

    Changing default passwords for anything is important, this is especially pertinent in my mind with a jailbroken iPhone as having default passwords and apps like openSSH, sftp and wi-fi, if you don't have your phone totally secured anyone could log onto your iPhone and wreck some havoc.

    Default passwords + the ability to remotely access a phone = trouble waiting to happen.

    Of course making sure you have things like openSSH disabled when not in use is always good practice as well, but say if you forget to disable openSSH and log onto someones network, it would be a piece of cake for a person who has access to the router you are connected with, to get into your iPhone if you leave the default passwords intact.

    Lets not even get started on how many default passwords are left on routers. Say you connect to a local pub's free wifi, someone else who is sitting there logs onto the router, grabs all the assigned ips and mac addresses, does a few quick scans, and if you have some open ports or services on your iPhone, combined with the default passwords, well lets just say no good can come of that.

    As to the genetics original question about changing a password with winscp, that is a SFTP/FTP/SCP client for windows yes? I'm not aware off hand of a way to change your iPhones passwords with that app. I would suggest getting an SSH client like PuTTY, connect to the iPhone and use the 'passwd' command to change whatever passwords for whatever accounts you like.
  7. genetic thread starter macrumors 6502

    Jul 15, 2008
    ^ thanks for the reply. What do you mean by "use the passwd command"? i just read that theres a way to do it through the mobile terminal app as well. im guessing either would do the same thing and is just as easy? is there a chance of my phone bricking with either? the reason i say this is because i read a few posts on other forums about people changing there root passwords and having there phone brick. im so paranoid :(
  8. tag macrumors 6502a


    Apr 29, 2005
    I haven't seen any posts about that but I'm not sure how changing a password would cause a phone to brick at all. I've had my passwords changed since the day I bought my iPhone, have installed and modded all kinds of things and have never ran into any problems.

    And yes you can use Mobile Terminal to change your passwords (it slipped my mind as I like to do terminal stuff to my iPhone from my laptop).

    When you open up MobileTerminal, you will be logged in as 'mobile', a user account, if you want to change the password for this account, at the prompt just type 'passwd'. It will ask you for your old password, 'alpine' and then prompt you to type in your new password twice (once and then again to confirm), that will change the password for the account 'mobile'.

    To change the root password, at the prompt type 'su' then type in the root password 'alpine'. Now you are logged in as root so type 'passwd' and now it will ask you to type a new password, and then again to confirm it.
  9. The General macrumors 601

    Jul 7, 2006
  10. Tex-Twil macrumors 68020


    May 28, 2008
    Can you tell us why ? The 1st thing I did after installing OpenSSH was changing the root pw.

    A simple reason for changing it is that when you are on a public hotspot with the default pw, everybody can ssh to your iPhone.
  11. The General macrumors 601

    Jul 7, 2006
    I think there was a bug on the later releases of the 1.x OS that make the Springboard just restart constantly if you changed the root password. Maybe he doesn't know that that problem was fixed.
  12. genetic thread starter macrumors 6502

    Jul 15, 2008
    ok so i have changed my root pw. is there any reason to change my mobile user pw too? heres what i did to change my root pw for the people who dont know.

    1. installed Mobileterminal via cydia
    2. typed su root
    3. alpine
    4. passwd
    5. then typed the new password
    6. repeated 5
    7. exit
    8. clear
    9. uninstalled terminal

    very easy! would i just replace root with mobile to change the mobile user pw if i need/want to?
  13. MBHockey macrumors 68040


    Oct 4, 2003
    New York
    This is kind of OT, but I figured you guys might know. Is there a way to get OpenSSH to be disabled on startup? Every time I turn my phone on I have to disable SSH because it is running as soon as my phone boots up. I'd just rather enable it when I want to use it, which is rare.
  14. macslayer118 macrumors 6502

    Oct 6, 2008
    Dallas, TX
    Thanks for this! I have Netatalk installed, so my iPhone automatically shows up as a network comp for any computer connected to the same network. I was afraid to connect to my school's WiFi with this kind of access to my phone. Just changed my password and it works like a charm! :D
  15. genetic thread starter macrumors 6502

    Jul 15, 2008

Share This Page