You also? Who else? 
There is no rule of thumb what would be the best way. one can recommend.
In general, scp
is faster than using curl
with WebDAV for file transfers.
scp
is optimized for speed and efficiency, and can take advantage of compression to reduce the amount of data transmitted over the network. scp
also supports resuming interrupted transfers, which can save time when transferring large files.
On the other hand, while it is possible to use curl
with WebDAV to transfer files, this approach may be slower than using scp
. While curl
can transfer large files, it may not be as optimized for large file transfers as scp
. scp
is specifically designed for efficient and secure file transfers over a network, whereas curl
is a more general-purpose tool for transferring data over various protocols, including HTTP, FTP, and others.
As for authentication, public key authentication with SSH is a more secure solution than storing cleartext passwords in an oldfashioned .netrc
file. While the .netrc
file is still supported by many tools, it is considered a security risk because it stores credentials in plain text. Public key authentication uses cryptographic keys to authenticate users and does not expose passwords to potential attackers.
That being said, the actual transfer speed depends on many factors, including the size of the files, the network speed and latency, the processing power of the servers, and the configuration of the transfer tools. I would recommend to test both methods in your specific environment to determine which one performs better for your use case.
If your hosts are on the same network, opening port 22 for SSH access is not an issue, since you may have it open annyhow, for your normal shell access.
peace
, and
Happy hacking