$ ssh -o "UserKnownHostsFile=/dev/null -o CheckHostIP=no StrictHostKeyChecking no" jchittum@0.0.0.0 -p 2222
The authenticity of host '[0.0.0.0]:2222 ([0.0.0.0]:2222)' can't be established.
ED25519 key fingerprint is <REDACTED>
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[0.0.0.0]:2222' (ED25519) to the list of known hosts.
jchittum@0.0.0.0's password:
Welcome to Ubuntu 22.04.4 LTS (GNU/Linux 5.15.0-101-generic x86_64)
passwd was set by running : mkpasswd --method=SHA-512 --rounds=500000
lock_passwd: false is _required_ to make this work. otherwise providing a password won't do anything, and you'll never be able to log in.
I'm wondering if it's from a different version of cloud-init instead?
next steps: try a coud-init config like i have above. If it fails, please provide your cloud-init and outputs (especially helpful with some cloud-init logs).
Tested working on the image from http:// cloud-images. ubuntu. com/releases/ jammy/release- 20240319/
$ ssh -o "UserKnownHosts File=/dev/ null -o CheckHostIP=no StrictHostKeyCh ecking no" jchittum@0.0.0.0 -p 2222 [fingerprint] )? yes
The authenticity of host '[0.0.0.0]:2222 ([0.0.0.0]:2222)' can't be established.
ED25519 key fingerprint is <REDACTED>
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/
Warning: Permanently added '[0.0.0.0]:2222' (ED25519) to the list of known hosts.
jchittum@0.0.0.0's password:
Welcome to Ubuntu 22.04.4 LTS (GNU/Linux 5.15.0-101-generic x86_64)
* Documentation: https:/ /help.ubuntu. com /landscape. canonical. com /ubuntu. com/pro
* Management: https:/
* Support: https:/
System information as of Mon Apr 1 11:55:56 UTC 2024
$ ls /etc/ssh/ sshd_config. d/ settings. conf
50-cloud-init.conf 60-cloudimg-
$ sudo cat /etc/ssh/ sshd_config. d/50-cloud- init.conf ication yes
PasswordAuthent
$ sudo cat /etc/ssh/ sshd_config. d/60-cloudimg- settings. conf ication no
PasswordAuthent
####
cloud-init and passwords is a bit confusing. here is a working example of a cloud-init:
#cloud-config import_ id: lp:jchittum
ssh_pwauth: true
users:
- name: jchittum
groups: [adm, lxd, sudo]
passwd: <HASHED_PASSWORD>
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
lock_passwd: false
- name: timmy
groups: [adm, lxd, sudo, cdrom, dip]
ssh_
sudo: ALL=(ALL) NOPASSWD:ALL
passwd: <HASHED_PASSWD>
shell: /bin/bash
lock_passwd: false
NOTES:
passwd was set by running : mkpasswd --method=SHA-512 --rounds=500000
lock_passwd: false is _required_ to make this work. otherwise providing a password won't do anything, and you'll never be able to log in.
I'm wondering if it's from a different version of cloud-init instead?
20231211: 0ubuntu0~ 22.04.1
cloud-init 23.3.3-
20240319: 0ubuntu0~ 22.04.1
cloud-init 23.4.4-
i don't see anything related in the changelog[https:/ /github. com/canonical/ cloud-init/ blob/main/ ChangeLog]
next steps: try a coud-init config like i have above. If it fails, please provide your cloud-init and outputs (especially helpful with some cloud-init logs).