I am usually using ssh-agent forwarding to get the key and have the actual private key only stored on my Windows machine in putty
When running the script on a linux machine I am logged in, it detects that no private key file is present and wants to create a new key. I worked around that by creating a id_rsa file with touch, maybe it would be possible to have an option to just use the id_rsa.pub file to create the account instead of creating a new key