0
点赞
收藏
分享

微信扫一扫

解决ssh packet_write_wait: Connection to 192.168.xx.xx port 22: Broken pipe的问题

通过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打个招呼,检测它是否存在,不存时即断开连接

解决ssh packet_write_wait: Connection to 192.168.xx.xx port 22: Broken pipe的问题_服务器

重启sshd

systemctl restart sshd


举报

相关推荐

0 条评论