PuTTY is a free-to-use software used to connect to remote computers over a secure connection. It can be used to create a Secure Shell (SSH) between 2 devices, open a Terminal Over A Network (telnet) connection, and offer a few other options as well. However, it can throw a few errors from time to time.
Today we are going to address a common fatal error that many users have experienced using the PuTTY software, which goes as follows:
Network Error: Connection Timed Out
A fatal error means the software throws an error without an intimation or warning without saving its state, and the user cannot perform any further actions.
An SSH connection can be established between a host (local) computer and a server (remote) device. This allows users to gain control of the remote device through a Command Line Interface (CLI) – which is very much similar to Remote Desktop Connection (RDC). The only difference is that the RDC has a Graphical User Interface (GUI).
Although SSH is mostly used to connect to devices having a CLI-based operating system (like Linux distros), it can also be used to connect to Windows computers as well.
A Windows 11/10 computer has a built-in SSH client and a server – meaning it can be used to connect to a remote PC using SSH, and it can be connected to as well. However, setting up the SSH server on a Windows computer needs some configuration, which we have discussed further down this post.
If you are an IT professional, then you must have used the PuTTY software at least once in your lifetime. Which is why you must understand that sometimes PuTTY displays this error message even when you have entered the correct information in it (which includes the IP address, the protocol, and the port number to be used).
Why “Connection Timed Out” Error Occurs
When the SSH protocol is establishing the connection between the 2 devices, the client sends out a message to the server, to which the server responds. However, if the client does not receive a reply after multiple attempts, the client prompts an error message stating “Connection timed out.”
Therefore, it can be concluded that PuTTY has been unsuccessful in establishing an SSH connection with the remote device. This can be due to several different reasons:
- The remote server’s IP address is inaccessible.
- The remote server’s firewall is blocking the respective SSH port.
- SSH and dependent services are disabled.
- Antivirus is blocking SSH traffic.
Let us now show you how to fix the problem so you can successfully connect to the remote device using the SSH protocol in PuTTY.
Fix PuTTY “Network Error: Connection Timed Out”
Confirm IP Access
To start with, confirm that the remote server is accessible from the client machine. This is most conveniently done by performing a ping test. Pinging the server from the client will ensure that the network connection between the 2 devices is valid.
Enter the following cmdlet in the Command Prompt while replacing IPAddress with the IP address of the remote PC you want to SSH.
If you find that the ping did not return a reply, this means that either the machine is not on the same network as yours, or the server’s firewall is up, which is blocking both the ping and the SSH connection.
Disable Windows Firewall
Windows firewall blocks most ports by default. Log into your server using the portal (or physically accessing the machine) and disable its firewall by performing these steps:
Open Windows Firewall by typing in firewall.cpl in the Run Command box.
Now click Turn Windows Defender Firewall on or off from the left.
Now select Turn off Windows Defender Firewall under every network profile visible. Once done, click OK to save the changes.
Now recheck if you can ping from the client machine. If yes, then retry the SSH connection and see if it works. If it still doesn’t, continue to perform the following solutions to mitigate the problem.
Check if SSH is Enabled
As we mentioned at the beginning of this post, an SSH server needs to be configured on a Windows PC before you can connect to it. Perform the following steps on the server to enable SSH:
Navigate to the following:
Settings app >> Apps >> Optional features
Here, click View features in front of “Add an optional feature.”
In the “Add an optional feature” window, search for “Open.” From the search results, select OpenSSH Server, and then click Next.
In the next window, click Install.
The feature will then be installed. When it does, you must manually enable the dependent services. Open the Services console by typing in services.msc in the Run Command box.
Here, right-click OpenSSH SSH Server and click Properties from the context menu.
In the Properties window, select “Startup type” as Automatic, then click Start to start the service. When it does, click Apply and Ok to save the changes.
Now that SSH is configured, you should be able to connect to this machine from the client PC using PuTTY.
If you still experience the same error, there are still a few more things you can do.
The built-in Windows Defender Antivirus in Windows 11 and 10, or any other third-party antivirus, can cause hindrance in an SSH connection. Try disabling them and checking if it resolves the issue.
Learn how to disable Windows Defender temporarily. If you are using a third-party antivirus, you must disable it also.
Once disabled, check if you can successfully connect to the SSH server using PuTTY.
The “Network Error: Connection Timed Out” error in PuTTY occurs even before a user is asked to enter the credentials. Therefore, the error cannot be blamed on incorrect user account information. Thus, it is only possible that there is an issue with the connection itself.
If you are still unable to resolve the issue after performing all of the solutions above, then as a last resort, you can try rebooting the server as well as the client. This has often solved problems for many users, especially when certain responsible services are not behaving as they should. A system reboot usually fixes these things.
If this doesn’t work either, then it is likely that the default SSH port has been moved by someone. You can check the listening ports of a machine and find out which port is designated for SSH.