After add expire: true in the cloud-init script, I can log in via key to the server, but it says You must change your password now and login again! I want if I set the password, the password expires after the first login and if I set a key, the system does not ask for the current password. Is there any solution?
This is my script
#cloud-config password: {$password} chpasswd: {literal}{expire: True}{/literal} ssh_pwauth: True ssh_authorized_keys: package_update: true package_upgrade: true