Open dvusboy opened 9 months ago
Just hit this also. Quick-googled some more details: https://stackoverflow.com/questions/71850135/generate-ed25519-key-pair-compatible-with-openssh
The x509 package does not support marshaling ed25519 key types in the format used by openssh, so as you've discovered, this code - which works with other key types - fails for ed25519 keys
There are few workarounds mentioned as well.
There lies the rub: the point of the plugin is to generate SSH keys, obviously requiring compatibility with OpenSSH. At this point, I would consider ed25519
not supported.
So, in my Packer template, I set
type = "ed25519"
. The build failed during Ansible provisioning with the following error:So, I try to SSH manually with the said key, and got an "invalid format" error message:
This is the content of the private key file:
Comparing this to an Ed25519 key-pair produced by
ssh-keygen
, it seems rather short:After switching to
type = "rsa"
, the Packer template worked.