You are almost guaranteed to get this error because when you download the key pair .pem file, the default permission will be “-rw r– r–“. The first 3 characters shows the permission of the user who owns the file. The middle 3 shows the group permission and the last 3 characters shows permissions for anyone not in the first 2 categories. So this is saying that the user can read and write, members of your group can read and all others can read. This is too open.

Changing it to 400 will result in “-r- — —” which means that only the user can read the file, and no other groups or users have any sort of access.