scp lost connection
I want to save website's backup folder to my local server using scp. However it always fails between 90 and 100%. I also tried using rsync with the exact same result.
I could successfully transfer the backup to my other desktop machine via f tp but I need to do this via command line this is why I chose scp.
complete.backup.2012-09-20-12-35-26.zip 92% 632MB 172.6KB/s 05:10 ETAdebug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype
complete.backup.2012-09-20-12-35-26.zip 92% 634MB 152.0KB/s 05:40 ETAdebug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
Transferred: sent 164760, received 665334128 bytes, in 3711.0 seconds
Bytes per second: sent 44.4, received 179289.4
debug1: Exit status 255
I hope you can help me.
Are you wired or wireless? I've had difficulties at times using scp on wireless boxes. If you are wired then, I don't understand why that would happen.
I am wired.
Originally Posted by Dapper Dan
I would examine whether your wired network is faulty. The transfer rates look very low, even for 10 MB ethernet. Bad cabling would be the place I would look first. Look for cuts and kinks in cables and connectors that are not properly terminated. Don't spool up excess cabling in a neat bundle as this will induce crosstalk in the cables. If possible, try using a direct cross-over cable between the two hosts, eliminating all other network infrastructure. Try using other combinations of hosts if available. Try using some ethernet diagnostics tools to see if there are low-level errors being detected. A simple start would be
netstat has a significant amount of other capability, and is probably your best/easiest tool for basic diagnostics. See if anything show up in syslog files as well.
## Or (as root)...
/sbin/ethtool -S eth0 ## Substitute your ethernet device as necessary
While it's likely, as theNbomr pointed out, that you have a hardware problem, you might try using wget to transfer the files. This program will continue interrupted transfers. I used to use it a lot for downloading ISOs of Linux distros etc. but more often use BitTorrent for that.
I agree with velikij. wget is the best for downloading files. The resume feature makes it all the more useful.
I exchanged the ethernet cable and the first file (about 700mb) was transferred successfully. However the same error occurred on the second file :(
Using wget via ftp works perfectly and this is totally sufficient for me.
Last I saw a problem like this, there were a lot of network collisions. look into ipconfig on network interfaces on both sides collision count.. might also want to check RX and TX error on both sides.
Any other known network problems? Typically if one application layer protocol has issues, you should see problems in other protocols in the stack as well.