This is a topic we've generally avoided as its not an easy process, and even with a step-by-step guide, the process can be tedious... but for those who haven't yet gotten around to hacking your iPhone (to install applications, ssh, etc..), Macworld provides a step-by-step guide which attempts to give instructions to do so.
The instructions are not perfect, as there are a few steps which don't seem to work as-is. For example, in my experience, the destination locations when using "putfile" frequently had to include the filename rather than just the pathname to properly copy. (example: /etc/dropbear/dropbear_rsa_host_key and not just /etc/dropbear)
Good Luck... but remember to proceed at your own risk.