← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1997588] [NEW] users module does not allow ssh_import_id and ssh_authorized_keys at the same time

 

Public bug reported:

I'm on ubuntu 22.04, using multipass 1.10.1 with a cloud-init file to
instanciate a simple server:

```yaml
users:
  - name: ubuntu
    ssh_authorized_keys:
      - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOkF+W1ETkZQr5PWhcugCVh3aSyNDFTYQRRblh7prGXN
    ssh_import_id:
      - lp:nrobinaubertin
```

I launch the instance with:
```shell
multipass launch -n simple_instance -d 10G -m 1G -c 1 --cloud-init cloud-init.yaml 22.04
```

And I check the authkeys file with:
```shell
multipass exec simple_instance -- cat /home/ubuntu/.ssh/authorized_keys
```

The key from `ssh_authorized_keys` is there but not the one from `ssh_import_id`.
>From the documentation website and the examples given [here](https://cloudinit.readthedocs.io/en/latest/topics/examples.html) I would expect both keys to be present.

** Affects: cloud-init
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1997588

Title:
  users module does not allow ssh_import_id and ssh_authorized_keys at
  the same time

Status in cloud-init:
  New

Bug description:
  I'm on ubuntu 22.04, using multipass 1.10.1 with a cloud-init file to
  instanciate a simple server:

  ```yaml
  users:
    - name: ubuntu
      ssh_authorized_keys:
        - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOkF+W1ETkZQr5PWhcugCVh3aSyNDFTYQRRblh7prGXN
      ssh_import_id:
        - lp:nrobinaubertin
  ```

  I launch the instance with:
  ```shell
  multipass launch -n simple_instance -d 10G -m 1G -c 1 --cloud-init cloud-init.yaml 22.04
  ```

  And I check the authkeys file with:
  ```shell
  multipass exec simple_instance -- cat /home/ubuntu/.ssh/authorized_keys
  ```

  The key from `ssh_authorized_keys` is there but not the one from `ssh_import_id`.
  From the documentation website and the examples given [here](https://cloudinit.readthedocs.io/en/latest/topics/examples.html) I would expect both keys to be present.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1997588/+subscriptions



Follow ups