设置ssh会话过期时间
客户端配置选项:
编辑配置文件 ~/.ssh/config
加入以下配置项,如不存在新建一个即可:
Host *
ServerAliveInterval 300
ServerAliveCountMax 2
服务器端:
编辑配置文件 /etc/ssh/sshd_config
,取消掉其中以下两项的注释:
ClientAliveInterval 300
ClientAliveCountMax 2
编辑配置文件 ~/.ssh/config
加入以下配置项,如不存在新建一个即可:
Host *
ServerAliveInterval 300
ServerAliveCountMax 2
编辑配置文件 /etc/ssh/sshd_config
,取消掉其中以下两项的注释:
ClientAliveInterval 300
ClientAliveCountMax 2