Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows 10 import pem file for openssh

Windows 10 Pro

OpenSSH client is already installed.

I have a pem file supplied by my AWS EC2 instance.

How and where do I install the pem cert in Windows 10.

mmc doesn't recognize the format.

This is the ssh command I want to run.

ssh -i c:\my.pem [email protected].

As expected I get WARNING: UNPROTECTED PRIVATE KEY FILE ... [email protected]: Permission denied but this shows the OpenSSH client is working.

I've searched the internet and SO to no avail .

like image 750
Joe Avatar asked Mar 18 '20 02:03

Joe


People also ask

How do I import a PEM certificate to Windows 10?

Navigate to Advanced > Certificates > Manage Certificates > Your Certificates > Import. From the "File name:" section of the Import window, choose Certificate Files from the drop-down, and then find and open the PEM file.


1 Answers

See ibug's answer here: https://superuser.com/questions/1296024/windows-ssh-permissions-for-private-key-are-too-open

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

Change the owner to you, disable inheritance and delete all permissions. Then grant yourself "Full control" and save the permissions. Now SSH won't complain about file permission too open anymore.

It should end up looking like this:

enter image description here"

like image 172
Joe Avatar answered Oct 13 '22 05:10

Joe