More Info:

Ensure that your production Microsoft Azure virtual machines are configured to use SSH keys instead of username/password credentials for SSH authentication.

Risk Level

Critical

Address

Security

Compliance Standards

PCIDSS, ISO27001, HIPAA

Triage and Remediation

Remediation

To remediate the misconfiguration “Virtual Machines Should Only Allow SSH Based Authentication” for AZURE using AZURE console, follow these steps:

  1. Go to the Azure portal (https://portal.azure.com/) and sign in with your credentials.
  2. Navigate to the Virtual Machines section.
  3. Select the virtual machine that needs to be remediated.
  4. Click on the “Networking” option from the left-hand side menu.
  5. Under the “Inbound port rules” section, remove the rule for RDP (Remote Desktop Protocol).
  6. Click on the “Add inbound port rule” button.
  7. Select “SSH” from the “Service” dropdown menu.
  8. Select “Any” or “IP Addresses” for the “Source” field, depending on your requirements.
  9. Click on the “Add” button to add the new rule.
  10. Save the changes by clicking on the “Save” button at the top of the page.

After following these steps, the virtual machine will only allow SSH-based authentication, and the misconfiguration will be remediated.

Additional Reading: