on mac

1. ssh-keygen -t rsa (type in passphrase)

on Iphone

  1. mkdir ~/.ssh
  2. chmod go-w / ~
  3. echo AuthorizedKeysFile .ssh/authorized_keys >> /etc/sshd_config

on mac

  1. scp ~/.ssh/id_rsa.pub root@iphone:.ssh/authorized_keys
  2. ssh root@iphone

It won't ask you for a password anymore

Recommended reading
1. Introduction to Cocoa Fundamentals Guide
2.Introduction to Cocoa Event-Handling Guide
3.ANSI C IO operations
References and API
1.CGGeometry Reference
2.FEN Reference