SSH and Latent Connections (e.g., satellite connections)

5

1

Most of the week I live in the city where I have a typical broadband connection, but most weekends I'm out of town and only have access to a satellite connection. Trying to work over SSH on a satellite connection, while possible, is hardly desirable due to the high latency (> 1 second).

My question is this:
Is there any software that will do something like buffering keystrokes on my local machine before they're sent over SSH to help make the lag on individual keystrokes a little bit more transparent? Essentially I'm looking for something that would reduce the effects of the high latency for everything except for commands (e.g., opening files, changing to a new directory, etc.).

I've already discovered that vim can open remote files locally and rewrite them remotely, but, while this is a huge help, it is not quite what I'm looking for since it only works when editing files, and requires opening a connection every time a read/write occurs. (For anyone who may not know how to do this and is curious, just use this command: 'vim scp://host/file/path/here)

Myles

Posted 2011-03-13T07:32:24.180

Reputation: 51

+1 good question. Also useful when doing work remotely on a client's system which is only hooked up via modem (we have that a lot :-( ). – sleske – 2011-03-13T10:38:41.460

Nagle's algorithm from RFC 896 should do what you want; buffer the keystrokes and send one big packet instead of multiple smaller packets.

– Cristian Ciupitu – 2014-06-07T02:18:50.117

Answers

2

One possible solution is to use sshfs to mount and browse around the remote filesystem with a local shell. You won't have latency while typing commands, but only when listing the contents of directories and accessing files. This includes significant delay on tab completion, since this triggers a listing of the current directory's contents.

Ryan C. Thompson

Posted 2011-03-13T07:32:24.180

Reputation: 10 085

2

This question is really old but, for posterity, mosh is a wonderful solution to this problem.

My only problem with it is that as of now it doesn't support SSH agent forwarding. The workaround I use is to have a separate SSH connection open, which I use when I need to git push to private repositories, establish tunnels, etc.

Anand Patil

Posted 2011-03-13T07:32:24.180

Reputation: 43