Slow ssh connection
Hello,everyone!:cool:
I open the ssh connection from my server and I constantly experience slow connection from my end to the server.When I typed some command in the putty console, the character seems like lagging for a few seconds and appeared. My server loading is light and I don't know what is the cause.Is it that the server is behind my router? Please drop me a line if you have any ideas. |
If the connection is taking too much time to take session then it means the network is slow and after getting a ssh connection if you are facing trouble it means the machine you are trying to connect is having performance issues.
so check the performance of the client machine you are trying to connect if you get the same problem while working directly on it. |
You could try the traceroute cmd http://linux.die.net/man/8/traceroute to get some actual figures.
Simple example Code:
traceroute ip.of.the.server |
check if you have nameserver set, ssh need Reverse resolution, when you dont have nameserver aviliable, it will take a long time to wait for timeout.
|
Can you ssh into the server on the same LAN as the server?
Try "ssh -C user@server". If that speeds things up, that could indicate a slow network connection. If you used "ssh -X user@server", there may be a problem with there not being a dbus session. If the problem is with a second ssh session, here is how you can use the same tunnel for multiple sessions: create a ~/.ssh/config file with these contents: Code:
Host * mkdir ~/.ssh/control-master This will speed up making new connections. Since you are going through a router (from outside the server's network I presume), the problem could be due to buffer bloat. http://www.coverfire.com/archives/20...y-experiments/ |
Thanks everyone!Those information are very useful.
Actually,my traceroute is about 12 hops. I guess it shouldn't be a problem. This issue is not going to happen if I am at home (in LAN). jschiwal,I'm going to look at your website to see whether this is the problem. Thanks all for helping out. |
All times are GMT -5. The time now is 01:18 AM. |