unable to create vm using ARM Template, throws error "The value of parameter linuxConfiguration.ssh.publicKeys.keyData is invalid"

Bhaskar 16 Reputation points
2022-06-27T15:07:09.3+00:00

unable to create vm using ARM Template, throws error "The value of parameter linuxConfiguration.ssh.publicKeys.keyData is invalid" I have declared the parameter everything seems to be fine.

215481-parameterfile.png215398-azuredeploy-jsonfile.png

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,039 questions
Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
1,263 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. deherman-MSFT 37,501 Reputation points Microsoft Employee
    2022-06-27T21:36:21.677+00:00

    @Bhaskar

    I just tested and I was able to use the same format in my ARM template to launch a Linux VM. I believe it is possible there is an actual issue with the ssh key format or some extra whitespace or characters were pasted. Are you able to launch VMs in the portal using this same key?

    You can check here on how to generate and properly format the key.
    https://learn.microsoft.com/en-us/azure/virtual-machines/linux/create-ssh-keys-detailed#provide-ssh-public-key-when-deploying-a-vm

    -------------------------------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.