大叔经验分享(121)ssh保持连接
Windows
xshell或securecrt会自动保持连接,putty设置如下:
In your session properties, go to Connection and under Sending of null packets to keep session active, set Seconds between keepalives (0 to turn off) to e.g. 300 (5 minutes).
Linux
vim ~/.ssh/config
Host *
ServerAliveInterval 300
ServerAliveCountMax 2
or /etc/ssh/ssh_config
参考:https://patrickmn.com/aside/how-to-keep-alive-ssh-sessions/
---------------------------------------------------------------- 结束啦,我是大魔王先生的分割线 :) ----------------------------------------------------------------
- 由于大魔王先生能力有限,文中可能存在错误,欢迎指正、补充!
- 感谢您的阅读,如果文章对您有用,那么请为大魔王先生轻轻点个赞,ありがとう