When you use the remote login tool putty or securecrt to connect to the server, the network is interrupted after a long period of time, and the software caused connection abort appears.
Software caused connection abort refers to the network interruption caused by software, so the solution should start with software, use Putty to connect to your Linux, and modify/etc/ssh/sshd in the server. in the config file, set the value of logingracetime to 0. The default value is 2 MB, and the value of tcpkeepalive is set to yes. Then, use service sshd restart to restart the sshd service.
Settings related to automatic disconnection when the Linux server is idle
How can I automatically disconnect a server from a terminal that has no operation for a certain period of time? # Vi/etc/profile added: tmout = 1800. If no operation is performed within 30 minutes, logout is automatically generated.
I recently found that securecrt will be automatically disconnected when I do not operate on the sshd server for a period of time. I checked it online and found that the firewall exists between the client and the server. For security reasons, the idle connection will be disconnected after the specified time. Solution: since idle connections will be disconnected, we should make the connection between the client and the server "busy". There are two methods:
Start from the server: Modify the clientaliveinterval 300 (default: 0) parameter in the/etc/ssh/sshd_config configuration file. This parameter means that the server sends a message to the client every five minutes, used to keep the Connection Service sshd reload effective
Start from the client: the above configuration requires server permissions. If you do not have server permissions, you can use this method. The idea is that the client sends a message to the server, used to keep the connection securecrt in option terminal anti-idle set the number of seconds to send a string, or the NO-OP protocol package Putty: putty-> connection-> seconds between keepalives (0 to turn off ), the default value is 0, which is 300.
When securecrt is used in work, the session is automatically disconnected if no operation is performed for a period of time after the remote server is connected. At this time, the corresponding session tag is green (if the network connection is interrupted, the tag turns red and prompts the connection to be interrupted and automatically reconnects), but no response is given when you press any key. The solution is simple: select Option-> session option-> terminal-> Anti-idle-> sendstring [char] Every 119 seconds You can. Send the char character every 119 seconds to keep the connection |