I'm trying to create a linux script that can be called to automatically sftp into an external server using a pem key which has an associated passphrase?
As far as I can tell it would be roughly something like:
sftp -i rsa_private.pem -p rsa_private_passphrase username@ip_address
But obviously this is passing in an assumed password for the sftp account and not for the pem key... I'm relatively inexperienced with linux scripting so any help at all would be highly appreciated!