I followed How to Capture an Image of a Virtual Machine Running Linux to capture a VM image, after installing the packages I wanted on top of Ubuntu 12.04 LTS. I turned off the machine following a waagent -deprovision
and Captured the image.
When I had created the first VM (which I later captured), I specified a certificate file key1.pem
.
When I created a new VM from the My Images image, I specified a certificate file key2.pem
.
When I attempted to connect to the new VM, I received the message Permission denied (public key).
. To connect, I used ssh -i ssh/key2 -p myport [email protected]
.
What's wrong? Are there special steps needed to use a different key than was used in the template image? Is this a bug?