Linux / Unix: curl Command Download File Example
Why the hell would one use curl to do scp, when “scp” exists and is the direct tool?
copy from remote host to “here”
scp firstname.lastname@example.org:/the/path/to/thefile . <– note the "."
copy from "here" to remote host:
scp file email@example.com:/the/target/path/
pub key authentication is automatic if there is a key that is acceptable to the server in your .ssh directory.