# 增加SSH连接远程vps的时间 URL: https://chengjinfang.com/posts/2017/linux-sshtime/ Author: 程锦方 Date: 2017-10-05 Tags: #linux #note Summary: 用Terminal远程连接VPS的时候,长时间不操作就会断开连接,如果想要增加这个时间可以已通过修改sshd_config。 Linux下,可以通过修改 /etc/ssh/sshd_config 文件,添加 ServerAliveInterval 20 ServerAliveCountMax 2000 每隔20秒向服务 ------------------------------------------------------------------------ 用Terminal远程连接VPS的时候,长时间不操作就会断开连接,如果想要增加这个时间可以已通过修改sshd_config。 Linux下,可以通过修改 /etc/ssh/sshd_config 文件,添加 ServerAliveInterval 20 ServerAliveCountMax 2000 每隔20秒向服务器请求一次心跳,请求2000次 OS X的文件地址在 /etc/sshd_config。 ![](https://chengjinfang.com/posts/2017/images/linux/sshd_config1.png) ------------------------------------------------------------------------ Site: https://chengjinfang.com/ · All Index: https://chengjinfang.com/all/ · RSS: https://chengjinfang.com/rss.xml