您可以不使用此ssh选项来防止连接断开吗?
在你的 ~/.ssh/config 文件中试试这个选项:
ServerAliveInterval=15
Run Code Online (Sandbox Code Playgroud)
摘自 man ssh_config
ServerAliveInterval
Sets a timeout interval in seconds after which if no data has been
received from the server, ssh(1) will send a message through the encrypted
channel to request a response from the server. The default is 0,
indicating that these messages will not be sent to the server. This
option applies to protocol version 2 only.
Run Code Online (Sandbox Code Playgroud)
您可以使用以下开关从命令行临时执行此操作ssh:
$ ssh -o ServerAliveInterval=15 keepsdroppingme.com
Run Code Online (Sandbox Code Playgroud)
目录的权限~/.ssh/可能有点麻烦,如果您需要任何其他指导,请参阅这篇文章:防止您的 SSH 连接冻结。
| 归档时间: |
|
| 查看次数: |
2509 次 |
| 最近记录: |