Problem brief: extremely slow and unreliable connection using PuTTy while apache server works fine.

I have a VPS with CentOS 6 installed and PuTTY SSH client running on Windows7 64 bit at home. The problem is that PuTTY works extremely slow and connection often drops. Sometimes I have to wait few minutes to get a responce (if I get any at all) thus working process is extremely inconvenient. Same problem also has FTP server vsftpd.

But the apache server (httpd) running on the same VPS shows excelent performance and always responds very quickly. One more strange thing: if any task with long execution time (for example wget or make) has been launched, PuTTy's output is always quick and connection never drops.

Any suggestions? I think about two possible reasons:

  1. Priority of SSH and SFTP server is low
  2. Some unknown specifics of VPS

I am not familiar with Linux close enough and would like to hear any suggestions to solve this annoying problem. Also it is interesting if anybody has similar problem.

  • does the same slowness occur if you ssh from a linux machine to your VPS?
    – cas
    Nov 6, 2015 at 12:21
  • Unfortunately the only computer I have at the moment is my laptop with Win7, so I cannot check that Nov 6, 2015 at 12:29
  • @Serjik: code markup is for code only, not plain English or brand/product names. Quote markup is for quoting things.
    – Mat
    Nov 6, 2015 at 14:18
  • CAS, you were right. I tried to connect from my Android smartphone with ConnectBot and the connection was good: speed is not bad and no more connection drops. I've been testing ConnectBot for one day and so far I am satisfied. It is even possible to connect to VPS from Win7 thru Android using PuTTy and it still works fine. Nov 8, 2015 at 11:11

2 Answers 2


Connections via ssh or web are different.

The connection web is opened, the data is sent and then closes.

The SSH session instead remains open until it is explicitly closed. The SSH session, therefore, is subject to timeout. I don't know why the connections are so slow so I can not express myself, but I can tell you that if you set a keepalive of putty can prevent sessions time out and go that close. You have to edit and save your session.

Look at the image,

enter image description here

You have to check "Enable TCP keepalives" and set a value (i think 10 is sufficient) in "seconds between keepalives"

  • Thanks for the answer, but of course I tried this before with no result. It seems like mainly TSL/SSL connections (SSH, SFTP) have this performance problem. So far I think this is a hosting problem because it also depends on time and hour. But still very strange that http works fine while SSH works so bad on the same VPS. The big question is: can I tweak my OpenVZ VPS with CentOS6 so that this problem disappears? Nov 7, 2015 at 15:48
  • P.S. average usage of RAM and CPU on VPS is no more than 20%. As for peaks, I have no info. Maybe TLS connection exausts CPU resource on OpenVZ? Nov 7, 2015 at 15:59

SSH works fine from linux machine like Android smartphone or Raspberry PI. That means the problem is in Windows 7 settings. As for details, I'm not interested to go further in because I found a workaround using Android as a proxy and that works fine for me. Thanks everyone.

  • Thanks to cas Nov 8, 2015 at 12:20
  • It may have to do with a bad MTU ... I have a vague recollection that Windows does not (or did not) do Path MTU Discovery properly ... anyone remember anything about this? Nov 8, 2015 at 13:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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