We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I created a packer image for Debian 12 with key-based ssh root access for provisioning tasks during the build process.
When creating an instance from this image with Terraform, I want to disable ssh login for the root user and lock the password.
The documentation states:
disable_root: (boolean) Disable root login. Default: true
Therefore I apply the below user_data config in Terraform.
I can see that cloudinit is run, the file /etc/ssh/sshd_config.d/50-cloud-init.conf is created and disables ssh password auth:
PasswordAuthentication no
But root login using the packer ssh key is still possible. 'PermitRootLogin no' is missing.
#cloud-config disable_root: true ssh_pwauth: false users: - name: root lock_passwd: true - name: ansible uid: 1000 ...
cloud-init.tar.gz
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug report
I created a packer image for Debian 12 with key-based ssh root access for provisioning tasks during the build process.
When creating an instance from this image with Terraform, I want to disable ssh login for the root user and lock the password.
The documentation states:
Therefore I apply the below user_data config in Terraform.
I can see that cloudinit is run, the file /etc/ssh/sshd_config.d/50-cloud-init.conf is created and disables ssh password auth:
But root login using the packer ssh key is still possible. 'PermitRootLogin no' is missing.
Steps to reproduce the problem
Environment details
cloud-init logs
cloud-init.tar.gz
The text was updated successfully, but these errors were encountered: