I am experiencing an unusual problem on my Windows 10 computer. I utilize both Putty and WinSCP, but I am encountering an issue where the connection terminates after a certain duration of inactivity.
Is there a solution to disable this timeout feature?
2 Answers
Introduction
Secure Shell (SSH) is a popular protocol used to connect to remote servers securely. However, sometimes users experience issues with SSH connections, such as timeouts. In this blog post, we will discuss a strange issue on Windows 10, specifically with Putty and WinSCP clients, where the connection times out after a certain amount of inactivity. We will also provide some solutions to get rid of this timeout issue.
The Issue
The issue that the user is facing on their Windows 10 machine is that the connection to the remote server is closing after a certain amount of time of inactivity. This issue is commonly known as a timeout issue. The timeout is set to a default value, which means that if there is no activity on the connection for a certain amount of time, the connection will be closed automatically.
This issue can be frustrating, especially if you are working on a remote server and have to keep reconnecting every time the connection times out. However, there are some solutions that you can try to get rid of this issue.
Possible Solutions
1. Edit the SSH configuration file
One solution to this issue is to edit the SSH configuration file on your Windows 10 machine. You can do this by following the steps below:
1. Open the SSH configuration file on your Windows 10 machine. The file is located at C:ProgramDatasshssh_config.
2. Add the following lines to the file:
Host *
ServerAliveInterval 120
These lines will set the server alive interval to 120 seconds, which means that the server will send a keep-alive message to the client every 120 seconds to keep the connection alive.
3. Save the file and restart the SSH service.
This solution should help to keep the SSH connection alive and prevent it from timing out.
2. Use a different SSH client
Another solution to this issue is to use a different SSH client that does not have the timeout issue. There are several SSH clients available for Windows 10, such as Bitvise SSH Client, MobaXterm, and SecureCRT. These clients are known to have better timeout management and should not have the same issue as Putty and WinSCP.
3. Disable the timeout on the remote server
You can also try disabling the timeout on the remote server. This can be done by editing the SSH configuration file on the remote server and setting the ClientAliveInterval and ClientAliveCountMax values to 0. This will disable the timeout on the server side.
However, this solution may not be feasible if you do not have administrative access to the remote server.
4. Use a VPN connection
Another solution to this issue is to use a VPN connection to the remote server. A VPN connection creates a secure and encrypted tunnel between your Windows 10 machine and the remote server. This tunnel will keep the connection alive and prevent it from timing out.
There are several VPN clients available for Windows 10, such as OpenVPN, NordVPN, and ExpressVPN.
5. Increase the timeout value
Finally, you can try increasing the timeout value on your Windows 10 machine. This can be done by following the steps below:
1. Open the Putty or WinSCP client.
2. Go to the SSH section in the settings.
3. Set the value of the “Seconds between keepalives” to a higher value, such as 300 seconds.
4. Save the settings and try connecting to the remote server again.
This solution should increase the timeout value and prevent the connection from timing out.
Conclusion
SSH connection timeout is a common issue that users face when connecting to remote servers. In this blog post, we discussed a strange issue on Windows 10, specifically with Putty and WinSCP clients, where the connection times out after a certain amount of inactivity. We also provided some solutions to get rid of this timeout issue, such as editing the SSH configuration file, using a different SSH client, disabling the timeout on the remote server, using a VPN connection, and increasing the timeout value. By trying these solutions, you should be able to keep your SSH connection alive and prevent it from timing out.
It’s possible for the server to terminate the connection due to inactivity instead of the program doing so.
PuTTY keep connections alive
- To keep your connection active, you need to load your connection session in PuTTY.
- After that, click on the “Connection” category in the pane.
- Under the “Sending of null packets to keep session active” option, type in “240” for 4 minutes or less in the “Seconds between keepalives” field.
- This setting will ensure that PuTTY sends a packet to the server every 240 seconds to maintain the connection.
- Finally, click on the “Session” category in the pane and save your session.
WinSCP keep connections alive
- To configure your connection settings, you should access the Advanced Site Settings dialog when you are connecting.
- Then, select a suitable method from the Keepalives section, and click OK to confirm your choice.