Skip to content

SSH Public Key Authentication

kokoabim edited this page Feb 11, 2012 · 6 revisions

The iOSOpenDev provided Xcode templates each have a Run Script Build Phase that executes the iosod command-line tool to (if build settings are configured to do so) build the target's Debian package, copy it to the device using scp (secure copy) and install the package running dpkg locally on the device using ssh. Since this operation is performed as a Build Phase, SSH public key authentication needs to be set up to allow password-less SSH connections to the device.

Requirements

  1. Wifi-enabled device connected to same network as Mac.
  2. OpenSSH package installed and running on device. If missing, install in Cydia.
  3. Known host name (e.g. MyiPhone) or IP address (e.g. 192.168.1.101) of device.

Steps

  1. Open Terminal and type: iosod sshkey -h [device-hostname-or-ipaddress]
  2. Read and follow prompts. For example, if a SSH authentication key does not already exist then one will be generated and the passphrase to set it will be asked.

IMPORTANT: Do not use "[device-hostname-or-ipaddress]" as the actual value in the command above, use your device's host name or IP address.

Additional Information

  • If a SSH authentication key is generated, it is stored under ~/.ssh of the local user's account.
  • Public keys added for SSH public key authentication for a device are stored in the root account's ~/.ssh/authorized_keys file on the device.