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.
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.
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.
Now open CMD or powershell as an administrator.
Now the command which is mentioned in the docs will work as expected.
ssh -i path-to-the-pem-file email@example.com
Hope it helps, Have a great day! See you on the next one!