14 ms·
I remember reading about this also, but never really received a good explanation. Implementation-wise SCP is a lot cleaner to use especially in code. It doesn't
by snagglegaggle 7y ago
I remember reading about this also, but never really received a good explanation. Implementation-wise SCP is a lot cleaner to use especially in code. It doesn't support some things like resuming a file, but it could, and in any case it's less of a pain than SFTP.
There was a recent CVE about writing to wherever the server specified but that does not necessarily reflect poorly on the protocol.
- jws 7y agoAnecdotally, and not necessarily protocol but current implementation on my Debian boxes… When copying a large number of small files rsync over ssh is much faster.
- jabl 7y agoModern rsync (err, 3.0+, so maybe not that modern any longer) can scan the directory tree concurrently with sending the files. (I'm not sure how it's done, presumably interleaving readdir() calls with non-blocking sendfile, allowing page cache prefetching as well as the actual sending to be done in parallel by the kernel.)
- snagglegaggle 7y agoDefinitely, but mostly due to compression and change tracking. The canonical replacement for scp is sftp which is to me a nonstarter, I'm either using scp in code or for single files, or rsync for a lot of files. I would use rsync everywhere, but I need to make up a good alias, it needs too many flags by default.
- jabl 7y ago> It doesn't support some things like resuming a file, but it could ... and if pigs could fly.. It could, but it doesn't, and openssh developers have made it quite clear they view scp as fundamentally broken and have no interest in improving it. Scripting sftp is, while doable, tedious compared to scp. Then again, rsync is scriptable as well and offers much more than scp.