I ssh on remote host but terminal performance is poor. Symbols I am typing are not shown immediately, but with some delay. Sometimes two symbols are shown at one time after delay.
closed as off topic by sysadmin1138♦ Jul 10 '11 at 23:50Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question. |
|||||||||||||||||
|
|||||||||||||||||
|
High latency is another cause of poor ssh performance. I highly recommend using mtr as a better replacement for traceroute. It should be able to give you some idea of where your network problems might occur. |
|||
|
|
|
Disabling X11 forwarding if you don't need it (ssh -x) and enabling compression (ssh -C) can also speed up your session. |
|||
|
|
|
I can think of two possible causes:
|
|||
|
|
|
I tried to measure network performance by soon discovered that terminal was fine. What has happened? We have a load balancing between two Internet channels router. Sometimes it routes my ssh traffic through wan1 and sometimes through wan2. I proposed, that there is something wrong with only one channel. So I measured network performance with mtr (great tool!) for two channels separately. yeah! wan2 has 21 hops with 110 ms and wan1 has 15 with only 21 ms! wan2 latency is the problem. |
|||
|
|
|
Use Compression and CompressionLevel of 9. That should help a little. You can configure these parameters in /etc/ssh/ssh_config. But if actual network is very poor this tricks wont do much good. |
|||
|
|
|
The most obvious cause for this behaviour is link that is either saturated or dropping packets. How many hops do you have from your workstation to the machine you are ssh'ing into? Have you analyzed a traceroute, if applicable? |
|||
|
|
|
If you are using OpenSSH on a long-fat-pipe (high bandwidth + high latency) make sure you're using at least version 4.7 on both sides because it contains fixes to make OpenSSH use a bigger tcp window size.
This can be important if you want to use the connection to its full potential because otherwise a sender may have to wait for acks before it can continue sending. |
|||
|
|
|
As already said by others, it can come from latency, loss on you network, slow server. |
|||||||||
|
|
It could also be some SSH Brute Force attempt that throttles your connection. Every time my session runs slow I check the logs and in quite a number of cases someone is trying passwords like crazy. |
|||
|
|
|
Misconfigured DNS can cause this. The server will respond just fine once logged in, and upload and download files fairly fast, but SSH logins will be slow. |
|||||
|
|
One thing to look at is simply server memory. I was running an Ubuntu VM with 256Mb of memory and SSH was really sluggish. Doubling this to 512Mb solved the problem. |
|||
|
|