Is it possible to locate the temp keypair generated by Packer? I`m creating a new image and everything is working. I would like to debug via ssh during the instance creation. A temp keypair is created and attached to the temp instance. My question is, can I get this keypair somewhere in order to debug it?

==&gt; amazon-ebs: Prevalidating AMI Name...
    amazon-ebs: Found Image ID: ami-0866798422f5d546b
==&gt; amazon-ebs: Creating temporary keypair: packer_5cc6c77d-494a-f185-b5b3-f9b59e62fd4e


Best,

Armando
First, make sure that packer runs in debug mode (packer build -debug ...), otherwise the temporary key will not be written to disk but will only be kept in memory.

packer will store the key in its working directory. In other words, look in the same directory from which you started the packer process.

If you use AWS, the file will be called ec2_amazon-ebs.pem. Assuming you are building an Ubuntu image, you should be able to login to the instance with this command:

ssh -i ec2_amazon-ebs.pem ubuntu@&lt;ip&gt;


(where &lt;ip&gt; can be found in the packer output or through the AWS console)