Copy-paste string automatically

Hi i'm not really sure if it's possible or not in bash. Basically I want to convert a ssh key created with ssh-keygen to putty format. The problem is that puttygen doesn't have an option for supplying passphrase in batch mode so it must be entered manually. For sskey generated with ssh-keygen i use a random passphrase and I don't know the passphrase until I send it to my email.
Of course that the passphrase is kept in a variable.

The question is , can i enter automatically the passphrase when certain input is required from the user ? (ie when puttygen asking for passphrase).

I know I can temporary echo the passphrase in bash but it isn't quite what I'm looking for.

Thank you.

the puttygen i have do not support command-mode.. im not sure if you can do that.

Well I use puttygen from putty-tools on ubuntu.
Is there any way to do what I'm trying or i should give up ?