Is there a way to pass the contents of a private key directly to the scp
command instead of having to copy it to a file and pointing at it via the -i /path/to/key.pem
option?
So instead of doing:
scp -i key.pem source target
Can I do something like the following?
scp -i '-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAMIIEowIBAA...\n' source target
Of course I tried this and it doesn't work but maybe this can be achieved with some BASH piping, output redirection, or something like that.
The reason I need to do this is because I can't store the keys in the filesystem (it's a very long and boring story) and this command will need to be executed millions and millions of times with a different key each time so the extra disk i/o will be significant in our results.