

Messages are being sent, ssh will disconnect from the server, If this threshold is reached while server alive ServerAliveCountMax Sets the number of server alive messages (seeīelow) which may be sent without ssh(1) receiving any messages backįrom the server. These settings will make the SSH client or server send a null packet to the other side every 300 seconds (5 minutes), and give up if it doesn’t receive any response after 2 tries, at which point the connection is likely to have been discarded anyway. You can also make your OpenSSH server keep alive all connections with clients by adding the following to /etc/ssh/sshd_config: KeepAlive yes just for you: edit ~/.ssh/config instead.for all users: edit /etc/ssh/ssh_config.Go to session properties > connection, and under Sending of null packets to keep session active, set Seconds between keepalives (0 to turn off) to e.g. To avoid close connections, verify your settings : Open cmd and use : putty.exe -v -ssh -v will show you many more information. To diagnose, first you have to use a verbose mode of putty.exe. It played up again just now and when attempting to telnet to the SSH port, it could in fact connect. Maybe my host is doing some maintenance?ĮDIT: TCPKeepAlive is enabled. I don't believe this to be a firewall issue as it will work most of time, then sometimes just not work. If it is worth anything, when I do connect to the server when it is "playing up", it appears to be slow (I will type a command and it will take a second or two to appear in the SSH window). I checked the syslog and I could not see anything interesting in there that could help with this problem.


When it starts to "play up", if I try 5-10 times to connect, I can successfully connect. I then attempted to telnet to another port on the VPS that I knew was running a service and it connected fine. When this happened last time, I attempted to telnet to the port that is running SSH and it could not connect. However, occasionally, PuTTY will report that Connection Timeout. Most of the time, PuTTY connects fine and I can log in fine.
#Putty ssh timeout error windows#
I have a VPS running Debian 7, that I connect to using PuTTY from my Windows machine.
