解决ssh packet_write_wait: Connection to 192.168.xx.xx port 22: Broken pipe的问题 程序员文章站 2024-02-21 23:29:16 ... 通过sshpass在远端服务器执行shell脚本,但是当shell脚本执行完成退出后,sshpass还未释放,过了2个多小时才退出,并抛出“ssh packet_write_wait: Connection to 192.168.xx.xx port 22: Broken pipe”的报错 解决:修改/etc/ssh/sshd_config 添加如下内容 ClientAliveInterval=60 #每一分钟,sshd都和ssh client打个招呼,检测它是否存在,不存时即断开连接 重启sshd systemctl restart sshd 相关标签: Linux 问题解决 ssh linux sshpass 上一篇: Cannot load driver class: com.mysql.jdbc.Driver 下一篇: Error creating bean with name ‘userServiceImpl’: Injection of resource dependencies failed 推荐阅读 解决ssh packet_write_wait: Connection to 192.168.xx.xx port 22: Broken pipe的问题 虚拟机使用ssh命令出现:packet_write_wait: Connection to **** port 22: Broken pipe 解决!