Azure Linux Virtual Machine uses passwords instead of SSH for authentication, this method is more vulnerable to brute force and word list attacks.
Once a Virtual Machine Scale Set is created in the console, the authentication mode cannot be changed. To create a resource with the correct settings, follow the steps below.
In Azure Console -
In Terraform -
References:
https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/linux_virtual_machine_scale_set#disable_password_authentication