Change iPhone root SSH password

If you have jailbroken your iPhone and have SSH installed it is a very good idea to change your default root password. The default root password for the iPhone 3G is “alpine” many people know this and if you are not careful you could get someone gaining access to your phone over your service providers’ data network or over a local wifi connection.

iphone-ssh

Once SSH is installed and active login to your phone using PuTTY.  Download PuTTy here.

You will just need to specify your phone’s local wifi IP address and SSH as the connection method. When prompted, enter your username as : root and password as : alpine

Once you get a command line, type in the command “passwd” and press enter.

Enter your existing password of alpine, then specify your new root password. Be sure to keep this safe and secure! I found that after changing the root password on my phone I needed to restart it – close putty, then restart your iPhone.

allowing root SSH access to your ESX host

In order to be able to SSH into your ESX host server via putty you need to enable root access via SSH. By default this is disabled – we will modify a configuration file and restart the service to allow ourselves into the ESX host console remotely.

From the console (you will need to physically be at the machine, or at least via a DRAC or KVM over IP), press Alt-F1 to access the command line and login as root.

Edit the following file:

/etc/ssh/sshd_config

You can do this by typing:

nano /etc/ssh/sshd_config

Go to the line that reads “PermitRootLogin no”

and change this to read “PermitRootLogin yes”

Press Ctrl-X to exit and press the “Y” key, hitting Enter to commit the choice to save.

Now we need to restart the sshd service to enable the changes. Type:

service sshd restart

and press enter.

You will now be able to SSH in as root.

Please drop me a comment if this has helped in any way!