TIL that the scp command does not, by default, compress files it transfers, and that you need to add the -C flag to make it do that, and by doing that I have sped up my transfer speed about 40x, and without this knowledge I have probably wasted literally days of my life waiting for things in the past.
@jimbob Also scp is actually deprecated which keeps boggling my mind.
@hynek looks like— in RedHat at least— the scp protocol is deprecated but the command remains, now by default uses the sftp protocol under the hood https://www.redhat.com/en/blog/openssh-scp-deprecation-rhel-9-what-you-need-know
OpenSSH SCP deprecation in RHEL 9: What you need to know

One of the most important security changes for OpenSSH in Red Hat Enterprise Linux (RHEL) 9 is the deprecation of the SCP protocol. Here's everything you need to know.

@hynek @jimbob what is the source for this? What’s the “official” replacement? I would have assumed even rsync was built on scp

That said, I see no reason to use scp over rsync. Yes , I can never remember all the flags, but that’s what shell aliases are for, since you only need a small handful of combinations to do anything.

@tjc @hynek @jimbob The main reason I use scp over rsync is I can't magically wipe half the files in the source copy directory if I get the scp flags wrong.
@mtomczak @hynek @jimbob I agree that rsync can be dangerous. That’s why I heavily use shell aliases / functions (fish) for these. I only ever use a small combo of flags, so once I get those use cases I make functions with pre canned flags and some checks on slashes and whatnot. It’s a one time pain but then I never think about it again.
@tjc @hynek @jimbob I think that's good advice for interfacing with the command line in general.
@tjc @hynek @jimbob The scp command should still work in pretty much all instances, but the scp protocol has been replaced with SFTP in the backend.

@tjc @jimbob Here’s some details: https://lwn.net/Articles/835962/

Not sure at this point if the sftp-based scp that’s teased in the article and IIRC was linked in this thread is more of a stopgap or the new real thing. I personally prefer scp too because it’s just simpler and less dangerous to use.

Deprecating scp

The scp command, which uses the SSH protocol to copy files between machines, is deeply wired i [...]

LWN.net

@tjc @hynek @jimbob Scp relies on legacy protocols and lacks proper args sanitation.

New versions of scp have been updated to use sftp internally to avoid the security issues, so maybe safe to use depending on OS, but it’s safer just to always use rsync instead.

Here’s a summary from Redhat with more info and links. https://access.redhat.com/articles/5284081

SCP support in RHEL - Red Hat Customer Portal

OpenSSH’s SCP (secure copy, remote file copy program) is infamous for its security record over the last years. This article provides summary of recent vulnerabilities as a reasoning for definition of SCP support in RHEL.

Red Hat Customer Portal