-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
SSH Handshake Error When Trying to connect to a RHEL9 image (using shell provisioner) #12091
Comments
I ran into this issue this morning building a new RHEL9 template using vsphere-iso. Digging into this a bit more it looks similar to a Red Hat issue [1] where they dropped support for ssh-rsa (signing with SHA-1) I then found #8609 [2] and saw that the fix had been merged to main already. After upgrading my packer vsphere plugin from 1.0.2 -> 1.1.0 and my packer version to latest (1.8.4) it appears that my issue is resolved now. I inserted this snippet into my template and ran packer {
required_plugins {
vsphere = {
version = ">= 1.1.0"
source = "github.com/hashicorp/vsphere"
}
}
} Hope that helps |
@safeaim are you still running into issues here? If you haven't already I would suggest trying with the latest version the vSphere plugin. There was a fix to the crypto libraries used by Packer to address the ssh-rsa issue that was affecting new Linux distros; especially RHEL variants. Please let us know if this issue gets resolved after upgrading. Cheers! |
We've had the same problems and after upgrading to the latest vpshere plugin the ssh issue with newer Rocky 9 images was resolved. |
Recommended for transfer to |
Hi @tenthirtyam, This was indeed a vsphere issue needing to be updated to use the updated SDK where we made the fix, but since this is already fixed let's skip the transfer and close it here now :) Thanks for the ping! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.
Overview of the Issue
In our build pipeline we are having issues with the shell provisioner not being able to connect to VM through the shell provisioner once the builder has finished setting up the VM. Once the vsphere-iso-builder has finished installing the VM and reboots, the shell provisioner is supposed to connect to the VM and run a script. However that fails with the following error seen in the packer-log:
From the OS it looks like this.
I have setup a small test packer-template that is only using the null builder and the shell provisioner to rule out involvement of the vsphere-iso-plugin, and even setup packer on a fresh machine without any older packer-references. And even then I'm still seeing the same error when packer tries to connect to the VM.
Reproduction Steps
Install a CentOS Stream 9/RHEL9 VM and set the following OpenSSH hardening settings in sshd.config:
Then run the following hcl-template against the VM:
Packer will then retry connecting forever until it times out.
Packer version
Packer v1.8.4
Simplified Packer Template
Operating system and Environment details
Red Hat Enterprise Linux release 9.0 (Plow) (5.14.0-70.26.1.el9_0.x86_64)
Log Fragments and crash.log files
packerlog.txt
The text was updated successfully, but these errors were encountered: