Skip to content

"Timed out waiting for instance launch." when using cloud-init to configure SSH AllowUsers #4281

@dennisvang

Description

@dennisvang

Describe the bug

Instance launch times out when specifying a cloud-config that sets AllowUsers in sshd_config.d.

To Reproduce

  1. create file my-cloud-config.yml:
    #cloud-config
    users:
      - name: myuser
        sudo:
          - ALL=(ALL) NOPASSWD:ALL
        ssh_authorized_keys:
          - <my-public-key>
    write_files:
      - path: /etc/ssh/sshd_config.d/ssh-custom.conf
        content: |
          AllowUsers myuser  
  2. launch instance with this config:
    multipass launch --cloud-init my-cloud-config.yml -vvv
  3. observe the resulting timeout:
    ...
    [2025-07-25T14:25:52.191] [info] [melodious-hairtail] process started
    Timed out waiting for instance launch.
    ...
    

Note

Actually it does work if I add the default ubuntu user to AllowUsers, so

AllowUsers myuser ubuntu

Expected behavior

I would expect this to work normally.

Also, based on the docs, I would expect there to be no default ubuntu user if it is not explicitly listed under users.

Logs

n/a

Additional info

  • OS: Ubuntu 24.04.2 LTS

  • CPU architecture or model: x86_64

  • multipass version

    multipass 1.16.0
    multipassd 1.16.0

  • multipass info

  • multipass get local.driver

    qemu

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions