I am dealing with a really slow shell connection. It is in the cloud and I am very far from the server. My connection also breaks sometimes as it is over the internet and I may also be using shared Wifi or 3G. Is there a way to see what I type instantly? Trying to type commands and waiting for each character is atrocious.
Mosh (mobile shell)
Remote terminal application that allows roaming, supports intermittent connectivity, and provides intelligent local echo and line editing of user keystrokes.
Mosh is a replacement for SSH. It's more robust and responsive, especially over Wi-Fi, cellular, and long-distance links.
Mosh is free software, available for GNU/Linux, FreeBSD, Solaris, Mac OS X, and Android.
an alternative (and also in addition) to dmourati answer: use
tmux or other things, to keep sessions alive when you are disconnected. (You simply re-attach to the session after you reconnect, and see the terminal as you left it, even with full screen programs [vi, etc]). It also have many other benefits (sharing sessions with co-workers, etc)
(as in Mosh own faq it states:
Q: Why is my terminal's scrollback buffer incomplete?
Mosh 1.2 synchronizes only the visible state of the terminal. Mosh 1.3 will have complete scrollback support; see this issue and the others which are linked from there. For now, the workaround is to use screen or tmux on the remote side.
And you should also use
rsync to copy files, without having to re-send already sent parts over the network when the connection dies.
You should see where the latency/bottleneck(s) are. You should try to get better access to infrastructure... either locally or at the provider's side. You wrap your important or critical sessions in
Please give us numbers. It takes a particularly-bad connection for simple SSH sessions to have problems... I've had to access systems on the other side of the world from an airplane over a VPN and still haven't had too much trouble. Is this a persistent issue? What does
traceroute tell you?
You can configure the ssh client to automatically send a protocol no-op code code every number of seconds so that the server won’t disconnect you. This setting is sometimes referred to as Keep-Alive or Stop-Disconnecting-So-Much in other clients.
Add the following line to the /etc/ssh/ssh_config file: