sending a large file with SCP to a certain server stalls at exactly 2112 kB

前端 未结 5 2084
半阙折子戏
半阙折子戏 2020-12-12 22:06

There is a certain ubuntu 10.04 server where if I ssh a file onto it from any server that is outside the office where this server is (meaning any of use scp-ing onto this se

相关标签:
5条回答
  • 2020-12-12 22:34

    I was seeing this same problem. None of the above suggestions worked for me, but they got me on the right path. I was behind a firewall with the MTU setting set to 1300. Setting my LAN card's MTU to really low (576, somewhat random) caused my packets to stop being dropped.

    $ sudo ifconfig eno1 mtu 576
    

    I had to do this on each of my Linux clients. For some reason, the windows machine on the same subnet didn't have a problem.

    0 讨论(0)
  • 2020-12-12 22:38

    I seemed to have found the fix. I had to set the LAN card's mtu setting to 1492 by:

    # ifconfig eth0 mtu 1492
    
    0 讨论(0)
  • 2020-12-12 22:41

    The only way I managed to get rid of this problem was by disabling TCP SACK:

    $ sudo sysctl -w net.ipv4.tcp_sack=0
    
    0 讨论(0)
  • 2020-12-12 22:43

    I got stuck with the same on a Mac OS X and @dav.garcia's answer did it for me with a small change:

      $ sudo sysctl -w net.inet.tcp.sack=0
    
    0 讨论(0)
  • 2020-12-12 22:47

    On newer Linux systems the ifconfig command may have been replaced by ip

    The command to set the mtu becomes:

    # ip link set dev eth0 mtu 1492
    
    0 讨论(0)
提交回复
热议问题