Connection abort, reset and timed-out errors in SSH and Telnet clients
What "Software caused connection abort", "Connection reset by peer", "timed out" and "refused" mean in SSH and Telnet clients, and what to check.
Terminal clients on Windows, such as PuTTY, show the text of a Windows Sockets error code when a connection fails. Other clients can show the same texts, because they come from the operating system's network layer. This page explains the common ones. Each describes where the failure was seen, which tells you which side to look at.
Software caused connection abort (10053)
Microsoft's description: "An established connection was aborted by the software in your host computer, possibly due to a data transmission time-out or protocol error."
So the software on the computer you are typing on closed a connection that was working. Microsoft names two possible reasons: a data transmission time-out, where data was sent and nothing came back for too long, or a protocol error.
What to check:
- Did the network break while the session was idle? PuTTY's manual describes it. If connectivity is lost and restored before either side sends anything, nothing is noticed. If one side does send during the break, it keeps trying to resend, then gives up and abandons the connection. The other side then no longer has a matching connection.
- Is a firewall or router dropping idle connections? PuTTY's manual says a firewall can close a session when no traffic is seen for some time, and that a non-zero keepalive setting can help. It also warns keepalives are not always helpful and can make breaks in connectivity worse. See SSH keep-alives and idle timeouts.
- Did the device sleep or change network? The Mosh project notes that most network programs, including SSH, lose their connections after roaming from one network to another. Mosh is built to keep them. See Mosh or SSH?.
- Software on your own device, such as a firewall or VPN client, is the other place to look, since the message says the local software aborted the connection. If you are allowed to, test with it off.
Connection reset by peer (10054)
"An existing connection was forcibly closed by the remote host." Microsoft lists the usual causes: the program on the remote host stopped suddenly, the host was rebooted, a network interface was disabled, or the host used a hard close. This one is about the host side. Ask the administrator whether the host or the SSH service restarted, or look at its logs.
Connection timed out (10060)
"A connection attempt failed because the connected party did not properly respond after a period of time, or the established connection failed because the connected host has failed to respond." If it appears when you first connect, the packets are not getting through: check the host name, the port, and any firewall in the path. If it appears mid-session, treat it as a network drop.
Connection refused (10061)
"No connection could be made because the target computer actively refused it." This usually means nothing is listening on that port: the SSH or Telnet service is not running, or you used the wrong port number. For an IBM i host, see IBM i Telnet connection refused, check that the Telnet server is running.
Other messages
- Network is unreachable (10051): The local system knows no route to that network.
- No route to host (10065): The system has no route to that host.
- Network is down (10050): The network stack or interface has failed or is off.
- Host not found (11001): The name is not known. Check the spelling, or try the IP address. OpenSSH prints this as
Could not resolve hostname; see ssh "Could not resolve hostname": Name or service not known.
Related
- SSH keep-alives and idle timeouts
- SSH problems
- Telnet basics
- Mosh or SSH?
- IBM i Telnet connection refused, check that the Telnet server is running
- ssh "Could not resolve hostname": Name or service not known
- Telnet to port 22: what the SSH-2.0 banner means
- SSH to a Mac from a phone or tablet, Remote Login and sleep
- Why did my session disconnect?
- SSH error messages, what each one means
- ssh exits with status 255: an SSH error, not your remote command