ubuntu防止ssh超时 vimetcsshsshdconfig 末尾加入:TCPKeepAliveyesClientAliveInterval60ClientAliveCountMax86400 ClientAliveCountMax,使用默认值3即可。ClientAliveCountMax表示服务器发出请求后客户端没有响应的次数达到一定值,就自动断开 ClientAliveInterval指定了服务器端向客户端请求消息的时间间隔,ClientAliveInterval60表示每分钟发送一次,然后客户端响应,这样就保持长连接了servicesshrestart