Victor Leung
Victor Leung
BlogAI SolutionAlphaAlgoFlower shopFX CombineIEESushi ClassifierWealth Agile

SSH: Fix Unprotected Private Key Error

June 28, 2015

The problem

When I download the .pem file to ssh my AWS instance, I encountered the following error:

WARNING: UNPROTECTED PRIVATE KEY FILE!

Permissions 0640 for ‘blog.pem’ are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. bad permissions: ignore key: blog.pem Permission denied (publickey).

The Solution

Run this command in your terminal

ssh -i xxx.pem root@52.74.3.53

Replace xxx.pem with your .pem file name

This will change the keys to be only readable by you.


About Victor Leung

Software development professional with expertise in application architecture, cloud solutions deployment, and financial products development. Possess a Master's degree in Computer Science and an MBA in Finance. Highly skilled in AWS (Certified Solutions Architect, Developer and SysOps Administrator), GCP (Professional Cloud Architect), Microsoft Azure, Kubernetes(CKA, CKAD, CKS, KCNA), and Scrum(PSM, PSPO) methodologies.

Happy to connect
LinkedIn
Github
Twitter
@victorleungtw

Continuous improvement

Copyright © victorleungtw.com 2023.