Ssh – scp to remote servers stalls, unable to isolate cause

linux-networkingscpsshvps

When I copy a large file (100+mb) to a remote server using scp it slows down from 2.7 mb/s to 100 kb/s and downward and then stalls.

The problem is that I can't seem to isolate the problem. I've tried 2 different remote servers, using 2 local machines (1 osx, 1 windows/cygwin), using 2 different networks/isps and 2 different scp clients. All combinations give the problem except when I copy between the two remote servers (scp).
Using wireshark I could not detect any traffic volume that would congest the network (although about 7 packets/sec with NBNS requests from the osx machine).

What in the world could be going on? Given the combinations I've used there doesn't seem to be any overlap in the thing that could be causing the trouble.

Best Answer

This could be caused by the MTU being incorrectly set.

Update

This is a possible duplicate of reliable-file-transfer-over-slow-or-flaky-network-link

You can get debug output from scp by adding -v argument - scp man page

My suggestion would be to use rsync over ssh

rsync -avz --progress --partial /path/to/copy ssh user@host:~/upload

~/upload would be in your users home directory