配置~/.ssh/config文件,增加以下内容即可:

Host *
        # 断开时重试连接的次数
        ServerAliveCountMax 5

        # 每隔5秒自动发送一个空的请求以保持连接
        ServerAliveInterval 5

添加在/etc/ssh/ssh_config应该也是可以的。

或者:

修改/etc/ssh/ssh_config文件,在Host *条目下添加 IPQoS=throughput

Host *
IPQoS=throughput
重启ssh

systemctl restart sshd 或 service sshd restart
报错:命令command not found

解决:sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist

  

相关文章:

  • 2021-11-21
  • 2022-12-23
  • 2021-11-02
  • 2021-11-11
  • 2021-10-31
  • 2021-10-08
  • 2022-12-23
猜你喜欢
  • 2021-06-01
  • 2021-10-01
  • 2021-10-21
  • 2021-07-19
  • 2022-12-23
  • 2021-12-03
  • 2021-05-11
相关资源
相似解决方案