One more thing: I think it would be better to put the keys in a fixed place like ~/.maas-test/key[,.pub] to help debugging. I suspect it will be very useful to be able to manually log into the VM while maas-test is running (and actually, I've used that a lot already when working on the networking stuff) and that will be more easy to do if the private ssh key is in a fixed place rather than somewhere in /tmp/.
One more thing: I think it would be better to put the keys in a fixed place like ~/.maas- test/key[ ,.pub] to help debugging. I suspect it will be very useful to be able to manually log into the VM while maas-test is running (and actually, I've used that a lot already when working on the networking stuff) and that will be more easy to do if the private ssh key is in a fixed place rather than somewhere in /tmp/.