Last Updated: September 09, 2019
·
37.07K
· leomao10

Resume Stalled SCP File Transfer In Linux

I actually learn the trip from this blog:
http://macinville.com/121/resume-linuxs-scp-transfer/

Here is the origin scp command:

$ scp -C root@xxx.xxx.xxx.xxx:/var/www/web/Web_Webroot_20110520.tar.gz /home/macinville/Downloads/.

According to EverythingLinux.Org:

Rsync is a wonderful little utility that’s amazingly easy to set up on your machines. Rather than have a scripted FTP session, or some other form of file transfer script — rsync copies only the diffs of files that have actually changed, compressed and through ssh if you want to for security.

And here is how to use rsync to download the files:

$ rsync --rsh='ssh' -av --progress --partial root@xxx.xxx.xxx.xxx:/var/www/web/Web_Webroot_20110520.tar.gz /home/macinville/Downloads/.

2 Responses
Add your response

Thanks for the tutorial. I run into this error message when I try to continue stalled SCP file transfer ...

Permission denied (publickey).
rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
rsync error: unexplained error (code 255) at io.c(605) [Receiver=3.0.9]

Any idea where the problem lies? Thanks.

over 1 year ago ·

pass path of public key file like this:

sudo rsync --rsh='ssh -i /path/to/publickey' -av --progress --partial root@xxx.xxx.xxx.xxx:/var/www/web/WebWebroot20110520.tar.gz /home/macinville/Downloads/.

over 1 year ago ·