Server Fault is a question and answer site for system and network administrators. 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

I'm try to transfer a large (1GB+) file from one machine to another, but I have to tunnel through a gateway in between. I'm able to transfer small files just fine. However, with the big file, the transfer stalls mid-way through.

After reading a blog post on the stalling scp transfers, I tried using -l 8192 and even tried lowering it to -l 2000, but that just seemed to make it stall sooner:

scp -l 2000 -v -P 2222 username@localhost:/path/to/file.gz .

From the verbose output (-v) of the scp command, it look like the -l isn't getting passed on…

debug1: Sending command: scp -v -f -- /path/to/file.gz

Any other ideas?

share|improve this question
-l shouldn't be passed on. It's a local option. – David Schwartz Oct 7 '11 at 22:32
up vote 3 down vote accepted

An ugly work around would be to use rsync instead of scp. The rsync program can reliably resume interrupted transfers. If it hangs, just break out with CTRL-C and repeat the command.

share|improve this answer

I think you should use rsync in a screen session. An interrupt can be re-run with --ignore-existing option.

share|improve this answer

I don't think rsync is an ugly work around. Be sure to use the -c flag rsync, that way it can pick up where it left off if the connection gets interupted, also include the --verbose to see more info during the transfer.

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.