linux - packet_write_wait:连接到@host 端口 22:管道损坏
问题描述
我正在尝试使用 scp 命令将一些文件从生产服务器(ubuntu 16.04)复制到备份服务器(ubuntu 16.04),但得到
packet_write_wait: Connection to @host port 22: Broken pipe
Lost connection
我试过添加
-o ServerAliveInterval=30 -o ServerAliveCountMax=5
来自 https://superuser.com/questions/1331240/packet-write-wait-connection-to-xxx-port-3591-broken-pipe https://superuser.com/questions/1331240/packet-write-wait- connection-to-xxx-port-3591-broken-pipe https://superuser.com/questions/1137584/packet-write-wait-broken-pipe-error-on-macos-sierra-ssh 但随后它开始抛出
Timeout, server @host not responding.
lost connection
我能够获得与备份服务器的 ssh 连接,但无法复制任何文件。指出我可以做的事情并将文件复制到备份服务器。提前致谢。
我发现我可以将最大 4k 大小的文件/文件夹复制到备份服务器,但不能复制更大的文件。当我尝试将大文件复制到另一台服务器但不在备份服务器上时,它正在工作。
解决方案
看来我通过将 LAN 卡的 mtu 设置为 1492 找到了解决方法
# ifconfig eth0 mtu 1492
有关更多信息,请参阅此链接:http: //www.microhowto.info/howto/change_the_mtu_of_a_network_interface.html
推荐阅读
- javascript - Select2 Vue 指令 - 已删除的数据不会从表单中删除
- python - Python将列表写入带有格式的文本文档
- java - 使用 jsweet 的动态函数(闭包)示例
- javascript - 如何在我的 API 调用中将图像作为“Base 64 编码文件内容字符串”发送?
- c# - c# qr 条码读取(unicode)
- r - R-数据框不存储表/数据
- php - 数组PHP中的动态括号索引
- r - 在 R 中创建和可视化联合概率分布
- python - 如何使用 Python 从 Excel 中提取特定行范围内的值
- variables - 使用特殊字符为用户名和密码创建 Ansible 变量