The Add-AzVmssSshPublicKey cmdlet adds the public keys that you can use to connect to the Virtual Machine Scale Set (VMSS) virtual machines over Secure Shell (SSH).
This example adds an SSH public key to the VMSS.
The first command uses the New-AzVmssConfig cmdlet to create a VMSS configuration object and stores the result in the variable named $VMSS.
The second command adds an SSH key with the specified key data and stores the key at the specified path on the virtual machine.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Specifies the full path of a file, on the virtual machine, where this cmdlet stores the SSH public key.
If the file already exists, this cmdlet appends the key to the file.
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.