TCP Keepalives
Some network routers and firewalls need to keep track of all connections through them. Usually, these firewalls will assume a connection is dead if no data is transferred in either direction after a certain time interval.
This can cause PuTTY sessions to be unexpectedly closed by the firewall if no traffic is seen in the session for some time, which will trigger the error: “Network Error: Software Caused Connection Abort”.
To solve this issue, you can configure PuTTY to send null packets and TCP keepalives every few seconds.
Configure PuTTY
In the left-hand menu pane, select Connection
In the field beside Seconds between keepalives, enter 5.
Check Enable TCP Keepalives (SO_KEEPALIVE option)
Now click Open and leave the SSH connection idle for a while to see if it stays up.
If you are using a PuTTY session profile, don’t forget to Save your profile with these new settings.
Still Getting Disconnected?
Check for an unreliable Internet connection
If you are still getting the error “Network Error: Software Caused Connection Abort” despite enabling TCP Keepalives, the problem may be due to an unreliable Internet connection. Monitoring your pings is a good way of determining if your internet connection is dropping packets and to blame for PuTTY disconnecting.
Open Windows Command Prompt and run ping google.com -t
(or the IP address of your remote server) and leave it running while your SSH connection is open. If you see even one message saying “Request timed out”, this indicates an internet connectivity issue, which may cause PuTTY to disconnect with “Network Error: Software Caused Connection Abort”.
You can also try some software that tests the uptime of an Internet connection. See: Internet Connectivity Monitor.
Try a different SSH client
Try using a different SSH client like (http://kitty.9bis.net) and see if the problem happens on that as well. If it does, you can isolate the problem away from PuTTY.
TCP Keepalives are not always helpful..
TCP Keepalives help if you have a firewall which drops your connection after an idle period; but if the network between you and the server suffers from breaks in connectivity, keepalives can actually make things worse.
If a session is idle, and connectivity is temporarily lost between the endpoints, but the connectivity is restored before either side tries to send anything, then there will be no problem – neither endpoint will notice that anything was wrong.
However, if one side does send something during the break, it will repeatedly try to re-send, and eventually give up and abandon the connection. Then when connectivity is restored, the other side will find that the first side doesn’t believe there is an open connection any more.
TCP Keepalives can make this sort of problem worse, because they increase the probability that PuTTY will attempt to send data during a break in connectivity. Other types of periodic network activity can cause this behaviour; in particular, SSH-2 re-keys can have this effect.
Therefore, you might find that TCP Keepalives help connection loss, or you might find they make it worse, depending on what kind of network problems you have between you and the server.
Found a Solution Yet?
Let us all know in the comments as this appears to be quite an elusive problem for many!
While You’re Here..
Sick of entering your Linux password every time you log in via PuTTY? See:
- Saving your PuTTY username and password in a Windows Shortcut
- PuTTY and SSH Key-Based Authentication
Make sure to keep your PuTTY settings backed up or copy them to another PC:
Did you know you can use PuTTY to set up a secure tunnel to your Linux box and then connect via VNC?
Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.
putty fatal error
I have a dd-wrt router. I disabled Setup / “Shortcut Forwarding Engine” to fix this problem.
o Supported authentication methods available(server sent: publickey,………………………)
can u solve this PuTTyY Fatal Error?
It worked for me, i dont know what you morons are complaining about? Putty needs to ping the end server to keep connection alive. If your connection keeps dropping, maybe its because you can’t afford a good internet connection.
I am making a Remote access to a terminal and in that terminal I have an SSH connection in the putty.
After following the instructions on the website the problem continues.
Is there any process that the connection does not error when we are using an access by RDP?
how to restore the session after the broadband internet-connection is lost? As I just need few minutes to re-connect my m/c through phone internet. I just want putty terminal to stay alive/active for at least 5 minutes after the lost connection.
Please respond.
Came across this whilst looking for a solution myself, as this was occuring when i tried to connect to a raspberry pi.
I did the following that seems to have cured it .. well it did for me!.
1. Open cmd box
2. sudo rm -r /etc/ssh/ssh*key
3. sudo dpkg-reconfigure openssh-server
Once done started PuTTy on window PC and hey presto connection immediately.
Thank you. Your solution really solved my problem. God bless!
Solved, check if you DNS is set to static IP or Dynamic
Thanks, been working for a week on trying to solve Win10 dropping SSH connections. Seems windows DHCP protocol has issues, static IP fixes it. Linux using DHCP doesn’t drop connections.
Just type sudo apt-get install openssh-server, wait till download process ends up, enjoy.
it’s work for me both are good thanks
Worked like a charm 🙂
+1
It worked slick and like a charm!!!!
Thanks for the specific details
I solved this by closing MS Outlook. Not sure why that was causing the problem though…
it still giving the same error.
Same
Same
Same
Same with”Check for unreliable Internet connection”
so how to solve this.
bad wifi and internet connection??
try using Protocol Version is IP4, if you are sure using IP4