免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5975 | 回复: 3
打印 上一主题 下一主题

关于修改SSH连接时间限制的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-10-13 15:25 |只看该作者 |倒序浏览
SSH连接linux,如果一段时间不去写命令,很快就自动断开了,想修改一下连接超时的时间,谷歌了一下,貌似是这个参数 ClientAliveCountMax ,但我在配置里面怎么没发现这个参数呢?

论坛徽章:
0
2 [报告]
发表于 2011-10-13 18:24 |只看该作者
自己顶一下。

论坛徽章:
0
3 [报告]
发表于 2011-10-18 23:53 |只看该作者
我是在/etc/profile中加上TMOUT,可以对一些用户做点判断。

       TMOUT  If  set  to  a  value greater than zero, TMOUT is treated as the
              default timeout for the read builtin.  The select command termi‐
              nates if input does not arrive after TMOUT seconds when input is
              coming from a terminal.  In an interactive shell, the  value  is
              interpreted  as  the  number  of seconds to wait for input after
              issuing the primary prompt.  Bash terminates after  waiting  for
              that number of seconds if input does not arrive.

论坛徽章:
0
4 [报告]
发表于 2011-10-19 00:00 |只看该作者
ClientAliveXXX
ServerAliveXXX
这些设置我觉得是保证TCP网络连接的,所谓KeepAlive就是如果网络发生错误导致连接中断等情况,这样KeepAlive包就会在某端发现而提示网络已断开。而不是等网络连接Time out,有时候这个值是很大的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP