Skip to content

Files

Latest commit

 

History

History
31 lines (22 loc) · 683 Bytes

AZU005.md

File metadata and controls

31 lines (22 loc) · 683 Bytes

Pattern: Password authentication in use instead of SSH keys

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
	}
}