scp like ssh has an option -i. In SSH that's documented as -i identity_file, and I have a file which works with ssh user@dest -i my.key to log in to a device without a password. SCP documents the same option as
-i identity_fileSelects the file from which the identity (private key) for public key authentication is read. This option is directly passed to ssh(1).
(emphasis mine). This documentation is clearly wrong, because scp my.file user@dest:/home/user/ -i my.key fails with
my.key: Not a directory
No, it's indeed not a directory. Clearly scp is not directly passing the argument to ssh, it does a check first, and that check in scp is probably the wrong way around (give an error if the argument is a directory)
Anyway, since scp -i is broken, what can I use instead? SCP version is from Debian 10, man page is dated 2018, no --version option available