Stalled SCP transfer? Switch to RSYNC

Having unstable ssh connection to server from which you want to download some larger data file? Ending up in this state, nothing is moving on?

$ scp -C user@server:/path/to/bigfile .
bigfile 14% 40MB 24.0KB/s - stalled -

There is quick and simple replacement that enables for restarting there transfer where it left off. The replacement is called rsync

rsync --rsh='ssh' -v --archive --progress --partial user@server:/path/to/bigfile .

If now the transfer stales, stop it and restart. The rsync command will continue transferring data from last ending position.

Note that rsh option (which remote shell to use) could contain more information, e.g.

rsync --rsh='ssh -i /path/to/identity_file -o ConnectTimeout=30' ...