PDA

View Full Version : [ubuntu] Slow SSH



shingalated
November 2nd, 2008, 08:41 PM
I am running a server at home doing some simple stuff (A few websites, a jabber server, and some other stuff I don't remember) I use comcast cable on the server's end and on my end here I am using the network at my college. Whenever I SSH I get a super slow connection. It is unbearably slow maybe about 22 bytes per second. If I type a command in an SSH shell it will take about 15 seconds to appear. This makes any sort of remote admin pretty much impossible. I went to a coffee shop in town to use free wifi and I get the same results. I tried running SSH on a non-standard port and get the same results. Any ideas what is going wrong?

shortridge11
November 2nd, 2008, 09:07 PM
try running a speedtest from your server end to see if a problem exists with that connection. You've probably already tried that, but just in case.

http://www.whatismyip.com/speedtest/index.asp

shingalated
November 2nd, 2008, 11:53 PM
I don't think I can do that easily. My server is CLI only. But it seems to be serving web pages and accepting HTTP uploads at a normal speed, so I think it is just SSH.

shortridge11
November 3rd, 2008, 12:32 AM
well even if it's CLI you could at least try pinging a site. I guess try pinging google.com
In any case, Another problem could be if you're forwarding the port to your box. Is your network set up to forward the correct port to your box? , what router/box setup are you using?

shingalated
November 4th, 2008, 12:48 AM
Pinging google from the server takes an average of 44 ms. I have both port forwarding from a non-standard port to port 22 set up and straight through port 22 external to port 22 internal. Both have this speed issue. SSH inside the network is fast. With a VPN it is still slow (only slightly faster)

shingalated
November 6th, 2008, 09:58 PM
Bump

john_navarro
November 6th, 2008, 10:01 PM
Are there any errors in /var/log/syslog that relate to packet buffering or drops? Is this connection over a VPN?

If the connection is over a VPN try: sudo ifconfig ppp0 mtu 1416

You will have to change ppp0 to the correct interface.

shingalated
November 6th, 2008, 10:17 PM
No, the connection is not over a VPN I just tried that a few times to see if it would help the speed, but it did not. There is nothing unusual in the syslog.

algould
November 6th, 2008, 11:00 PM
In the file sshd_config, see if UseDNS is set to "yes". If it is, change it to "no". Then restart sshd (or reboot) and see if your performance improves.

shingalated
November 6th, 2008, 11:23 PM
/etc/sshd_config doesn't exist, and sshd_conf exists but is empty.

algould
November 7th, 2008, 05:36 PM
Try adding the following line to sshd_conf:

UseDNS no

shingalated
November 7th, 2008, 09:03 PM
That helped a little, but it is still really of slow.

jonobr
November 7th, 2008, 09:14 PM
Best way to do cli throughput testing is using something like iperf

Installing Iperf on both ends allows you try uploading and downloading files using tcp and udp.
It gives a good idea of throughput , latency, bandwidth and packet loss as well as results using different packet sizes

sudo apt-get install iperf

Theres a good few resources on the web for interpreting the results.
You could also post here.