SFTP - non-interactive - using passphrase

Hi,

I have written a script that does SFTP successfully without using the password (Thanks to this site :b: ) and it works fine.
The thing is - this script uses the public and private key generation with a "null" passphrase.

But I now need to write a script that does SFTP non-interactively but still must be given a the generated passphrase in order to function.

Can anybody help or suggest please??

ssh-key-gen I think can be used to put a password on your existing private key.