SSH can only work on the jail broken iPhones. If you have jail broken iPhone then SSH can work on your system through the following steps. Step 1) from the iOS Device, Step 2) SSH from your Mac or Windows PC, Step 3) Change the Default iOS Passwords
Ultimately, I was foiled by the security features of the Mac. I found that SSH attempted to log me in as the account owner of the Mac itself, rather than letting me to supply my own log-in name and associated password. In effect, I couldn't log on as anyone except the owner of the Mac account, at least by default. Because I didn't have an account on that Mac and my friend with the Mac didn't have an account on my Linux box, I couldn't log in.
My current (minimalistic) Linux startup file, so that I remember that unsetting SESSION_MANAGER is the right way to avoid complaints from gnome-session:
$ cat .vnc/xstartup
#!/bin/sh
unset SESSION_MANAGER
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
gnome-session &