Hello everyone,
I am currently changing my cloud-init config file since I would like to not do the user creation via snippets. (Since I would like to do this via the Cloud-Init tab of the VM as this allows me per VM control and not needing to have every VM the same since they all use the same snippet/cloud-init config file.)
So now I have removed the users section in the cloud-init config file and added my prefered username, password and SSH key to the cloud-init tab of the VM.
But after I boot the cloud image for the first time, it does apply the network, and apt configuration correctly, but when I try to login via the specified user, I get a invalid username or password error.
Also when I try to login via SSH with my SSH key, I still cannot login as te VM does not reconize my key. (My key is a ssh-ed25519)
So I have no clue if cloud-init did create my specified user or not but ether way, I am not able to login.
Does any know what I did wrong or how to fix this?
My Cloud-Init config:
My Cloud-Init tab:
I am currently changing my cloud-init config file since I would like to not do the user creation via snippets. (Since I would like to do this via the Cloud-Init tab of the VM as this allows me per VM control and not needing to have every VM the same since they all use the same snippet/cloud-init config file.)
So now I have removed the users section in the cloud-init config file and added my prefered username, password and SSH key to the cloud-init tab of the VM.
But after I boot the cloud image for the first time, it does apply the network, and apt configuration correctly, but when I try to login via the specified user, I get a invalid username or password error.
Also when I try to login via SSH with my SSH key, I still cannot login as te VM does not reconize my key. (My key is a ssh-ed25519)
So I have no clue if cloud-init did create my specified user or not but ether way, I am not able to login.
Does any know what I did wrong or how to fix this?
My Cloud-Init config:
packages:
- qemu-guest-agent
- git
- figlet
- nala
- fail2ban
runcmd:
- cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
- sed -i 's/backend = %(sshd_backend)s/backend = systemd\nmode = extra\nmaxretry = 3\nfindtime = 1d\nbantime = 1d\nignoreip = 127.0.0.1\/8/g' /etc/fail2ban/jail.local
- sed -i '/^#/!s/\[sshd\]/\[sshd\]\nenabled = true/g' /etc/fail2ban/jail.local
- systemctl restart fail2ban
- nala fetch --auto -y
- nala update
- systemctl enable qemu-guest-agent
- systemctl start qemu-guest-agent
- git clone https://github.com/realcryptonight/debian-install-scripts.git
- cd debian-install-scripts/
- chmod 755 setup-standard.sh
- ./setup-standard.sh
- cd ../
- rm -rf debian-install-scripts/
My Cloud-Init tab: