Wondering how come nobody mentioned about http://shellinabox.com . I evaluated shellinabox & ajaxterm. Shellinabox is faster than ajaxterm (I do not know the internal details). Also, shellinabox can login a user without needing to give the user explicit ssh access (not sure if it is a great plus).
Shellinabox has issues running inside an iframe though. But if you are looking to run something standalone to access your server, guess shellinabox is the best bet.
I have been running Rails Tutorial site for sometime now. I eventually deployed Gateone - https://github.com/liftoff/GateOne but it had quite a few issues with browser + OS combinations. Finally we created our own pseudo terminal (it does not support vim etc). Check https://github.com/pocha/terminal-codelearn .