MobileTerminal is the OS X terminal.app for the iPhone. It's a native shell running right on the device, complete with gesture controls, macros, and more. I use this app constantly to SSH into servers, run ping tests from the iPhone, and anything else I might need to do from a standard shell. It's the reason why I'm still using my iPhone. Free through Cydia.