Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm always SSHing to servers, sometimes it's over TOR, sometimes it's a server that's far away and the latency is really high. Is there a way to buffer my key strokes locally before they are sent to the machine on the other end?

I'm often using the default Ubuntu terminal and the OSX terminal.

share|improve this question
I don't understand why buffering your input would help with latency at all? I'd think you'd want each keystroke to be transmitted immediately?? – Doc Jul 6 '11 at 20:38
@The Phoenix: Local line editing ("buffering") would make it easier to type command lines. High latency causes a big delay between pressing the key and having the letters appear, which is terribly inconvenient: I would sometimes enter a long command, wait up to two seconds for everything to be displayed, notice a ton of typos, kill and retype the whole line... With local editing, the keypresses would be visible instantly. – grawity Jul 6 '11 at 21:19
Sending fewer packets means using less bandwidth. Over a sufficiently slow link, using less bandwidth means improved latency. – Flimzy Jul 6 '11 at 21:19
@grawity - I see, well I suppose I get ya. I think in order for this to work, your ssh client MUST implement some kind of support for this. I'd look to the ssh man page on OSX - but maybe you've done that and maybe they didn't bother to document everything. – Doc Jul 6 '11 at 21:23
I'm tempted to recommend typing in a text editor and then pasting into the terminal, but I would like a legitimate answer to your question myself. – William Jackson Jul 6 '11 at 21:24
up vote 2 down vote accepted

If you're looking for a better remote terminal experience over high latency and/or low throughput, I highly recommend you have a look at mosh.

share|improve this answer

Old Telnet supported local line editing. I once ran telnet over SSH to try this feature but soon realized it being even worse - no cursor keys or ctrl-keys in editors or command-line.

CopyPaste is your friend or mounting directories.

share|improve this answer

This may work, but your interactive experience will be broken in several ways (e.g., no TAB-completion, no ability to interrupt with ^C on the remote host, etc.):

ssh -T remotehost /bin/bash --login -i

The -T option forces SSH not to allocate a pseudo-terminal, and it may cause the local ssh client to read a line at a time before transmitting.

share|improve this answer

The command flag -T does work, although a found better user experience is to be found with PUTTY. It has option for "local line editing" and "local echo"

The command string then only gets sent with 'Enter' key.

share|improve this answer
-T does not do "local line editing" or similar with OpenSSH (whihch comes with Ubuntu). -T is used to supress pseudo tty Allocation. – davidgo Mar 3 '13 at 19:21
@davidgo He's not equating them. – Zenexer Aug 6 '13 at 11:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .