Mosh is another terminal application which handles unstable internet connection. It also employs a local buffer so that you get instant response after each keystroke. The latter is what I have always wanted to see for a very long time. I have a VPS account with RackSpace, and with crappy internet connection here it took very long before each character appears on my screen after each keystroke, making it very hard to work with.
Notes for the problems I encountered while trying to install and use Mosh:
- I have to install Mosh on both the server and the client. I installed Mosh on both my the OS X and my Ubuntu 64-bit server.
- OS X's terminal is, by default, sending its LC_* environment variable when you SSH to another machine. LC_CTYPE is set to UTF-8 by default and it is fine under OS X Lion. But when this is send to my Ubuntu server, it caused a problem with setlocale call. Must comment out SendEnv line in /etc/ssh_config on my Mac. Thanks to tip from this page! - http://thegreyblog.blogspot.com/2012/02/fixing-mac-os-x-lions-ssh-utf-8-issues.html
With this, I can mosh to my Ubuntu server, the same way as I do with ssh:
$ mosh m3rlinez@gantserver.com
I got the response from each keystroke almost instantly as advertised, albeit there was usually an initial long lag before I could type smoothly. This was impressive as the response time was waaaay better than a normal ssh. Way to go Mosh!