Hi,
We wish to add multiple ssh keys while creating VM. For example, I wish to create a VM with user "azureuser" and add 2 public keys to it. The RestAPI(https://docs.microsoft.com/en-us/rest/api/compute/virtualmachines/createorupdate#create_a_vm_with_ssh_authentication.) can support this feature. Is this feature supported in Azure CLI? Thanks!
Not supported through vm create, and also after a vm gets create, the linuxConfiguration.ssh.publicKeys becomes read-only. Based on that, before we get more votes for the support, right now, your workaround is:
az group deployment create <template-file>@adewaleo, let us wait on this before we get more votes. When to fix it, we can expand the --ssh-key-value to be a list
@yugangw-msft, this might also be a good candidate for generic --set for create commands.
@yugangw-msft Thanks for the workaround and looking forward to the new feature support :)
@yuxisun1217, this feature has been added via #9306 with --ssh-key-values. --ssh-key-value would also work. They are aliases for one another, as the CLI accepts prefixes of options as long as it is unique to one option.
These change should be in our upcoming 5/21 release.
Got it. Thank you so much!
Most helpful comment
@adewaleo, let us wait on this before we get more votes. When to fix it, we can expand the
--ssh-key-valueto be a list