Skip to content

Files

Latest commit

 

History

History
31 lines (22 loc) · 719 Bytes

azure-compute-ssh-authentication.md

File metadata and controls

31 lines (22 loc) · 719 Bytes

Pattern: Use of password authentication for Azure virtual machine

Issue: -

Description

Access to instances should be authenticated using SSH keys. Removing the option of password authentication enforces more secure methods while removing the risks inherent with passwords.

Resolution: Use SSH keys for authentication.

Examples

Example of incorrect code:

resource "azurerm_virtual_machine" "bad_example" {
	os_profile_linux_config {
		disable_password_authentication = false
	}
}

Example of correct code:

resource "azurerm_virtual_machine" "good_example" {
	os_profile_linux_config {
		disable_password_authentication = true
	}
}