I have some working shell code that addresses at least part of this, which you can tap for ideas. It generates SSH keys, adds fingerprints to a separate known hosts file, and prunes them when done with the instance.
It's not mergeable into Juju as is, but the functionality is quite nice. It's in a shell script called 'cloud-sandbox' in lp:bikeshed.
I have some working shell code that addresses at least part of this, which you can tap for ideas. It generates SSH keys, adds fingerprints to a separate known hosts file, and prunes them when done with the instance.
It's not mergeable into Juju as is, but the functionality is quite nice. It's in a shell script called 'cloud-sandbox' in lp:bikeshed.