Slow SSH response
I'm not too sure how to describe this problem. I'm just as confused on how to solve it. Basically I have an SSH server setup on a remote server. This server isn't a PC, nor is it physically accessible by me.
I connect to it via SSH, using a client on my (current) local PC to the SSH server. The login process isn't slow at all, which seems to be the dominant Slow SSH problem I've read about.
Instead, it'll connect and then things will be slow. Sometimes the login process does reflect the same slowness as when connected, other times it does not. Even when connected the slowness isn't always exhibited (or at least noticable).
Example: I'll type in "ls -l" or something simple. The characters don't appear on the screen until a second later. I'll have executed the command before it even shows up. It gets worse too. When the command runs, it might freeze a bit, pause here and there. "ps waxu" has displayed this on several occasions.
Then there's vim, how I edit all my text files. I usually just open up, and blaze right through. But, when the connection seems to "drop" intermittently, this becomes... difficult.
So if you're still reading this, thanks cause I'm about to go over what I've tried to solve it. I've tried the following:
1) I've got a Windows laptop that has PuTTY installed. I tried to connect to my SSH server using PuTTY. I don't get the same SSH Slowness.
2) The loadavg's on the server are usually around 0 to 0.1. And there don't seem to be any run away processes hogging the system.
3) I rebooted the server. No effect. (Aww my uptime is gone!!!)
4) I rebooted my local PC. No effect. (Another lost uptime)
5) My local PC has two linux installs on it: Mandrake 9.1, and my "dubbed" distro Frozix which is LFS based. I went into Mandrake to see if the problem could be produced there, and, it was.
6) I added the server's info (IP/HOSTNAME) to my /etc/hosts file. No effect.
7) I switched the CAT5 cable that leads from my NIC to my internet switch. Didn't do anything.
The laptop plugs into the same switch as my local PC, so, since PuTTY doesn't seem to experience any problems, I have no idea why I'm getting this intermittent 'slowness' issue.
Any ideas? (thanks alot to anyone who replies)
I should note that the slowness I'm experiencing isn't typical internet 'lag', since this problem just surfaced, oh, a few days ago. My noticing it is what prompted my attempted solution.
I did another test. I thought I did all I could, but...
Anyway, I have a decently sized file on my server. So I figured I'd do a connection speed test. I have both my laptop and (this) computer on right now, both connected into the same internet (3 Mbps cable).
Anyway. The laptop downloads at ~300 KB/sec.
My PC downloads at well..it varies alot. It goes from 20 KB/sec to 140 KB/sec. Right now it's at 37 KB/sec.
So. Doesn't this seem odd? What's weird is it sort of "just" started happening, not quite a week ago.
It's either my hardware (that would be my onboard nvidia ethernet) or the driver it uses (that ForceDeth thing).
It's never been a problem though. I've been able to use my max connection here. Interesting. Any way I could determine which it is? Or if it is even either at all?
Well no one responded. That doesn't make me feel good, but I've got beter news. I solved it myself (as it seems I've had to do with every other situational problem I've had)
It seems that the 5th port on my switch is... "bad" or something. Moving the cable to the 2nd port fixed the slowness and all the connection problems. Yay!
I have exactly the same problem
But I'm using a laptop on wifi as client, so I have no switch to touch here.
I'm having the exact same problem on two different servers at two different providers.
I had this problem for more than a year now.
Well...fr0zen is saying that his problem was in fact hardware related rather than software so perhaps you should try to find some empirical ways (trial and error)to check your hardware... patience and persistence is needed.
In fact, I found a solution now.
If the ssh connection is very slow then uncomment the following directive: GSSAPIKeyExchange no
in the file: /etc/ssh/ssh_config
This made my ssh connection much more responsive.
Is your client computer using a wireless network when you are ssh-ing into the server? If so you might want to try using a wired connection instead to see if this improves anything.
If it does chances are that the wireless network has a high rate of dropped TCP segments.
I have had this issue and I helped myself with two measures:
1. I configured my system to use a slower wireless networking speed (11MBit)
2. I upped the send power of the wireless network
I still have glitches but they have become quite a bit more rare.
Yes I'm using different wifi networks, homes, cafes, always had the same problem.
But it looks like now with my fix (see my above comment) I have a nicely responsive ssh.
|All times are GMT -5. The time now is 04:50 PM.|