PuTTY Network Error: Software caused connection abort

PuTTY Fatal Error: Network error: Software caused connection abort

Last updated on

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.

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

The problem may be an unreliable Internet connection. Monitoring your pings is a good way of determining if your connection is dropping packets and is 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 you SSH connection is open. If you see even one Request timed out, this indicates a connectivity issue and may cause PuTTY to disconnect.

CMD Ping: Request Timed Out

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.

Keepalives are not always helpful..

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 then 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.

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 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:

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?

1 Star2 Stars3 Stars4 Stars5 Stars 4.19 (31 votes)

Let me know in the comments if this helped. Follow me on Twitter, Facebook and YouTube.

p.s. I increased my AdSense revenue by 68% using AI 🤖. Read my Ezoic review to find out how.

13 replies

avatar
  Subscribe  
newest oldest
Notify of
Papamole
Guest
Papamole
Papamole
8 months ago

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.

Selvaraj Muthusamy
Guest
Selvaraj Muthusamy
Selvaraj Muthusamy
10 months ago

Thank you. Your solution really solved my problem. God bless!

Ilemona James
Guest
Ilemona James
Ilemona James
10 months ago

Solved, check if you DNS is set to static IP or Dynamic

DzmitryN
Guest
DzmitryN
DzmitryN
11 months ago

Just type sudo apt-get install openssh-server, wait till download process ends up, enjoy.

hostingride
Guest
hostingride
hostingride
1 year ago

it’s work for me both are good thanks

Patrick
Guest
Patrick
Patrick
1 year ago

Worked like a charm 🙂

Wolfium
Guest
Wolfium
Wolfium
1 year ago

+1
It worked slick and like a charm!!!!
Thanks for the specific details

Luke
Guest
Luke
Luke
1 year ago

I solved this by closing MS Outlook. Not sure why that was causing the problem though…

saad alam
Guest
saad alam
saad alam
1 year ago

it still giving the same error.

Ethan
Guest
Ethan
Ethan
1 year ago

Same

Henrique Sathler
Guest
Henrique Sathler
Henrique Sathler
8 months ago

Same

Sachin
Guest
Sachin
Sachin
7 months ago

Same

peguine
Guest
peguine
peguine
5 months ago

Same with”Check for unreliable Internet connection”
so how to solve this.