are really pain in the ass. I found a nice tool making the situation much better: mosh http://mosh.mit.edu/ Most distributions having prebuilt packages. For Android http://dan.drown.org/android/mosh/ and IOS http://www.zinger-soft.com/iSSH_features.html clients are also available.