-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
amazon-ebs: failed to handshake when upgrading to Packer 1.8.5 #336
Comments
Hi 👋 thanks for reaching out. For general questions we recommend reaching out to the community forum for greater visibility. If you find the forum to be more helpful or if you've found the answer to your question elsewhere please feel free to post a response and close the issue. |
Hi @bgaber please provide your packer build file I can take a look. |
Hi @bgaber, Since this issue is related to the Amazon plugin, I'll transfer it over to the packer-plugin-amazon project for tracking purposes. As @Glyphack mentioned, please provide us a redacted/minimal template if possible so we can investigate the reason why this happens. Thanks for reporting this. |
@bgaber I also hit this issue. Check: |
Hi there, Looking at the logs again, this looks like a problem with Ansible's local proxy connection only offering RSA keys, which is now deprecated and rejected by OpenSSH. We fixed this by changing the default key algorithm for this in the Ansible plugin not so long ago, so this should be fixed. I'll close this now, but feel free to reopen if this problem persists, even on the latest versions of the plugin. Thanks |
packer version: v1.8.5
initiator OS: RHEL
guest image OS: RHEL 8
Ansible: 7.2
I am upgrading from Packer version v1.6.6 to v1.8.5 and am seeing this error when building a new AWS EC2 AMI:
2023-02-14T02:30:28Z: ==> amazon-ebs: Provisioning with Ansible...
2023-02-14T02:30:28Z: amazon-ebs: Setting up proxy adapter for Ansible....
2023-02-14T02:30:28Z: ==> amazon-ebs: Executing Ansible: ansible-playbook -e packer_build_name="amazon-ebs" -e packer_builder_type=amazon-ebs --ssh-extra-args '-o IdentitiesOnly=yes' --extra-vars env=sharedservices -e ansible_ssh_private_key_file=/tmp/ansible-key3825398156 -i /tmp/packer-provisioner-ansible2559500676 /drone/src/ansible/linux8.yml
2023-02-14T02:30:32Z: amazon-ebs:
2023-02-14T02:30:32Z: amazon-ebs: PLAY [Build RHEL/CentOS 8.x] ***************************************************
2023-02-14T02:30:32Z: amazon-ebs:
2023-02-14T02:30:32Z: amazon-ebs: TASK [Gathering Facts] *********************************************************
2023-02-14T02:30:32Z: ==> amazon-ebs: failed to handshake
2023-02-14T02:30:32Z: amazon-ebs: fatal: [default]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Unable to negotiate with 127.0.0.1 port 42665: no matching host key type found. Their offer: ssh-rsa", "unreachable": true}
2023-02-14T02:30:32Z: amazon-ebs:
2023-02-14T02:30:32Z: amazon-ebs: PLAY RECAP *********************************************************************
2023-02-14T02:30:32Z: amazon-ebs: default : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0
2023-02-14T02:30:32Z: amazon-ebs:
2023-02-14T02:30:32Z: ==> amazon-ebs: Provisioning step had errors: Running the cleanup provisioner, if present...
2023-02-14T02:30:32Z: ==> amazon-ebs: Terminating the source AWS instance...
2023-02-14T02:33:04Z: ==> amazon-ebs: Cleaning up any extra volumes...
2023-02-14T02:33:04Z: ==> amazon-ebs: No volumes to clean up, skipping
2023-02-14T02:33:04Z: ==> amazon-ebs: Deleting temporary keypair...
2023-02-14T02:33:04Z: Build 'amazon-ebs' errored after 13 minutes 20 seconds: Error executing Ansible: Non-zero exit status: exit status 4
The text was updated successfully, but these errors were encountered: