Permissons For Pem Are Too Open

title: Permissions for .pem are too open description: While connecting to Azure VM via SSH came across a series of stumbling blocks and hence the series of blog posts as documentation of the learning curve. This may help others. createdAt: 2020-11-15T17:16:19.541Z updatedAt: 2020-11-15T17:16:19.541Z img: /articles/images/image_thumb_637410573794423074.png author: name: Admin tags:

Rest of the Story:


title: Permissions for .pem are too open description: While connecting to Azure VM via SSH came across a series of stumbling blocks and hence the series of blog posts as documentation of the learning curve. This may help others. createdAt: 2020-11-15T17:16:19.541Z updatedAt: 2020-11-15T17:16:19.541Z img: /articles/images/image_thumb_637410573794423074.png author:
name: Admin tags:

  • azure
  • linux

While connecting to Azure VM via SSH came across a series of stumbling blocks and hence the series of blog posts as documentation of the learning curve. This may help others.

Connecting to newly created Azure VM via SSH came across the error surrounding permissions on my pem file

PS c:\>ssh –i {pathtopemfile}.pem mailto:azureuser@{ipaddress}

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
WARNING: UNPROTECTED PRIVATE KEY FILE!          @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Permissions for '{filename}.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.

You locate the file in Windows Explorer, right-click on it then select "Properties". Navigate to the "Security" tab and click "Advanced".

a) Change the owner to you

b) Disable inheritance and delete all permissions.

c) Then grant yourself "Full control"

and save the permissions.

Now SSH won't complain about file permission too open anymore.  It should look like the following

image