Remote Mac login to iPhone, and password Modification

Source: Internet
Author: User

In a public Wi-Fi network or 3G environment without a password, if the initial password is not changed, the system is vulnerable to virus intrusion, and the information in your mobile phone is stolen.


Download OpenSSH, remotely log on to the iPhone through the command line terminal on the Mac, change the password, and perform routine management

(Do not go to mobileterminal. There seems to be no mobile phone command terminal for version 5.0.1 on the Internet. In fact, it is more convenient to use SSH commands on Mac)

1. Click cydia, click an OpenSSH access how-to entry on the homepage, and click the blue text of the first OpenSSH entry to install it.

(Or download and install OpenSSH directly in the cydia search. The installation steps are omitted)

2. view the IP address of the iPhone (for example, the local IP address on the iPhone is

For wi-fi connection: Click set, and then click wifi. After the connected wireless network name is displayed, click ">" at the rightmost to view

(For 3G connection: Open the browser and enter "ip" in Google search. Click "Search" to view the information)

3. The iPhone and Mac must be on the same LAN (the IP address on Mac is

4. Open the terminal and enter the SSH root@

The first login is slow and will jump to the confirmation prompt (SSH willRecord the public key used to access the iPhone on the Mac ~ In the/. Ssh/known_hosts file, the slow speed is because the public key is generated.)

The authenticity of host' ('Can'T be established.RSA key fingerprintIsBC:99: De: EF: EE: B7:53:01: 4A: A9:96:85:28: DD: 1A: BD. Are you sure you wantContinueConnecting (Yes/No )?

Enter "yes" and then prompt for the password

Root @'S password:

The default password is "Alpine". Enter "enter"

Usermato-iPhone :~ Root #

The above prompt indicates that the login is successful (What do you want to do now)

5. Modify the root password

Enter the passwd command, and then enter the new password twice. The modification is complete.

Usermato-iPhone :~Root # passwdchanging PasswordForRoot. New Password: retypeNewPassword: usermato-IPhone :~ Root #

6. Modify the Mobile User Password

Enter the passwd Mobile Command, and then enter the new password twice. The modification is complete.

Root @'S password:Usermato-iPhone :~Root # passwd mobilechanging PasswordForMobile. New Password: retypeNewPassword:

A mobile user is a built-in account. Although his or her permissions are low, he or she has the required permissions to read photos, text messages, and music file directories.


Note: If you change the network environment WiFi, you may not be able to log on to the iPhone.

(For example, if the IP address of my iPhone is, you can log on to it. If the IP address of the iPhone is at home, you cannot log on to it. PS: this is also an incentive for my previous flash drive)

It is actually related to the machine Public Key mentioned above,When accessing the same iPhone, OpenSSH checks the public key. If the public key is different, OpenSSH will issue a warning and login is not allowed to preventAttacks such as DNS hijack


Method 1: Use a text editor or Vim command to open ~ /. Ssh/known_hosts, change to, and then you can log on

Method 2: delete the file directly or use the command RM ~ /. Ssh/known_hosts: delete known_hosts. In this case, the logon will wait for half a day and the above record public key prompt will appear again.


You can use SSH to automatically log on to the iPhone for Mac without a password:

(Ssh-keygen is used for password verification. Common commands such as SSH and SCP are not used for password verification)

1. Ssh-keygen-T [RSA | DSA] will generate the key file and private key file id_rsa, or id_dsa,,Stored in user ~ /. Ssh directory
2. Copy the. Pub file to the iPhone user directory ~ /. Ssh, and CAT >> ~ /. Ssh/authorized_keys
Note: make sure that only the users on the iPhone have write permission for. SSH and authorized_keys. Otherwise, the verification is invalid.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.