ssh sessions 连接空闲一会儿就中断freezing,how to keep alive
To enable SSH keep-alive, follow these simple steps:
- Open your SSH client configuration file, typically located at ~/.ssh/config (for Linux/macOS) or %userprofile%\.ssh\config (for Windows).
- Add the following lines to the configuration file:
Host * ServerAliveInterval 60
Save the configuration file.
In the above example, the ServerAliveInterval option specifies the time interval (in seconds) between keep-alive messages. Adjust this value according to your requirements. It is recommended to keep the interval reasonably low to maintain responsiveness without overwhelming the server with excessive keep-alive traffic.
阅读量: 849
发布于:
修改于:
发布于:
修改于: