# Stop Packer from generating SSH key when using ssh\_password

**URL:** <https://discuss.hashicorp.com/t/stop-packer-from-generating-ssh-key-when-using-ssh-password/33834>\
**Category:** Packer\
**Created:** [January 4, 2022, 9:41pm UTC](https://discuss.hashicorp.com/t/stop-packer-from-generating-ssh-key-when-using-ssh-password/33834 "2022-01-04T21:41:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![smcevoy](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/smcevoy/32/16400_2.png) [@smcevoy](https://discuss.hashicorp.com/u/smcevoy)\
**Post date:** [January 4, 2022, 9:41pm UTC](https://discuss.hashicorp.com/t/stop-packer-from-generating-ssh-key-when-using-ssh-password/33834/1 "2022-01-04T21:41:18Z")

</div>

I am using ssh\_password to provide a plain test password for access to my GCE Instance during my Packer build. Packer is still generating an ephemeral SSH key and adding it to instance metadata. I don’t want this to happen as adding SSH keys to instance metadata cause the Google guest agent to configure a number of settings on the guest instance that I want to avoid.

I have a workaround to create a dummy SSH key and provide it using the ssh\_private\_key\_file attribute which does stop Packer from generating an SSH key and adding it to metadata.

Wondering if there’s a better way?
