Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 using the OSX application Terminal to work remotely on Amazon EC2 servers through SSH.

Occasionally and seemingly randomly, my keystrokes are delayed. I've tried reconnecting, restarting Terminal, restarting my computers, etc... Nothing seems to solve the problem, and it comes and goes. I've tried other terminal emulators and they seem to have the same problem whenever I'm experiencing it. There is never delay in my keystrokes when I'm working locally on my own machine through Terminal.

What are some causes of this keystroke delay? Is there anything I can do about this?

I'm using Terminal in a location I don't usually work from, so maybe the internet connection has something to do with this. Does Terminal mimic the connection speed to the server as you type?

share|improve this question
Do you experience any significant keystroke delay using Terminal or other emulators when not working remotely? If not, it should only be a matter of network latency. – user13742 Jan 9 '12 at 22:03
So terminal emulators include network latency in their interface? They show my keystrokes on the screen only at the time those keystrokes are actually reaching the remote server? – T. Brian Jones Jan 9 '12 at 22:11
Rather, they show the keystrokes on your the screen whenever they have been acknowledged by the remote server. This will be later than the point at which they are received by the server (as it has to send back the acknowledgement). I also agree that this sounds like standard network latency. If this latency is caused by saturation of the network, you might consider trying compression using ssh -C. – Chris Down Jan 9 '12 at 22:30
up vote 4 down vote accepted

It is your connection. SSH only displays what the remote server tells it to, so it'll only echo your keystrokes once the remote server receives and process them and tells the shell to print them.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.