1.SFTP用户不查询DNS关闭DNS解析useDNSno2.Heartbeatkeepalive多路复用,1对多,避免重复开启ssh进程,只保留一个socket,只需要在客户端设置即可。ControlMasterautoControlPath~/.ssh/%r@%h-%pControlPersist12h添加到/etc/ssh_config整体配置:Host*CompressionyesServerAliveInterval60ServerAliveCountMax5ControlMasterautoControlPath~/%h-%rpControlPersist12h4.保持SSH服务器客户端版本一致参考:keepalivehttps://patrickmn.com/aside/how-to-keep-alive-ssh-sessions/Wikihttps://en.wikibooks.org/wiki/OpenSSH/Cookbook/MultiplexingOpenSSH多路复用器加速OpenSSH连接https://www.cyberciti.biz/faq/linux-unix-osx-bsd-ssh-multiplexing-to-speed-up-ssh-connections/https://blog.scottlowe。org/2015/12/11/using-ssh-多路复用/
