Connecting to Azure VM from Windows: A Step-by-Step Guide to Resolving Errors

Connecting to Azure VM from Windows: A Step-by-Step Guide to Resolving Errors

·

1 min read

Connecting to an Azure VM from windows can be a bit tricky and you may get errors like

WARNING: UNPROTECTED PRIVATE KEY FILE! Permissions for ' ' are too open, It is required that your private key files are NOT accessible by others This private key will be ignored. ,etc.

This is a quick guide to solving that issue and connecting to the VM.

Step 1:

Before this, have a copy of the .pem file, if in case anything doesn't work out, you can always start from scratch.
Right-click on the .pem file, go to security and click advanced.

Step 2:

Click Disable inheritance, and go with "Convert inherited permissions into explicit permissions on this object".

Remove the accounts, Except "SYSTEM" and "Administrators".

Click Apply and Okay.

Step 4:

Now open CMD or powershell as an administrator.

Step 5:
Now the command which is mentioned in the docs will work as expected.

ssh -i path-to-the-pem-file user@0.0.0.0

Hope it helps, Have a great day! See you on the next one!