Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I attempted to copy a file (of size, ) over the network using scp I get a error <file> stalled Why does this happen? How do I resolve it?

share|improve this question
up vote 52 down vote accepted

This happens because scp is trying to grab as much bandwidth as possible, and any delay (by a firewall, etc.) can stall it. Limiting the bandwidth (with -l option) will fix it.

For example, you might want to limit the bandwidth to 1 MB/s (= 8192 Kbits/s):

 scp -l 8192 <file> <destination>


share|improve this answer
Thank you for your answer and the link to the source. But I think your source says that -l 8192 means 8192 Kbit/second, and the -l might work up to 1 Mbit/second (which seems to be a bit outdated nowadays). – elmicha Nov 26 '11 at 20:50
Thank you very much. – Lelouch Lamperouge Nov 26 '11 at 21:19
@elmicha 8192Kb==1MB – Lelouch Lamperouge Nov 26 '11 at 21:20
@Eknath Oops, you're right. – elmicha Nov 26 '11 at 21:32
Just to clarify: the example limits scp's bandwidth to 8192 Kbit/second. The source article's author suggests that this number should work fine for connections of upto 1 Mbit/second. – Erwin Wessels Jan 17 '14 at 6:38

Any chance you're behind a Cisco ASA firewall? If so, turn off "sequence number randomization" and that'll help a lot -- also disable TCP Offload (ethtool -K $INTERFACE tso off gso off gro off) if you're on a Cisco ASA with Broadcom NICs in your server.

share|improve this answer

I've managed to solve it by using rsync:

rsync -avz -e "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress /tmp/bigfile.txt
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.