Cloud-Init should allow you to modify password after first time login. But if SSH closed while changing password:
WARNING: Your password has expired. You must change your password now and login again! Changing password for ubuntu. Current password: passwd: Authentication token manipulation error passwd: password unchanged Connection to 192.168.0.102 closed.
There might be Cloud-Init issue in older version.
There is a workaround to by-pass force passwd. Find
/boot/firmware/user-data in the boot partition, then you will see options:
# On first boot, set the (default) ubuntu user's password to "ubuntu" and # expire user passwords chpasswd: expire: true list: - ubuntu:ubuntu
Update expire to false if you do not want to change password in first login. Or create your own
expire is not work.
Please notice that device is not safe using default user name and password. Change it after you connect to the device.