【问题标题】:packet_write_wait: Connection to @host port 22: Broken pipepacket_write_wait:连接到@host 端口 22:管道损坏
【发布时间】:2020-12-14 19:50:12
【问题描述】:

我正在尝试使用 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 大小的文件/文件夹复制到备份服务器,但不能复制更大的文件。当我尝试将大文件复制到另一台服务器但不在备份服务器上时,它正在工作。

【问题讨论】:

标签: linux networking ssh ubuntu-16.04 scp


【解决方案1】:

似乎我通过将 LAN 卡的 mtu 设置为 1492 找到了解决方法

# ifconfig eth0 mtu 1492

更多信息请参考此链接:http://www.microhowto.info/howto/change_the_mtu_of_a_network_interface.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-07-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多