How To Connect SSH Using PEM Certificate On Windows

Usually you will need a pair of SSH username and password to connect to a remote server. But there's also another way to connect to the server via SSH but without password, just using a dot pem (example.pem) file.

Here's how we usually do on Windows

1. Let’s SSH login using pem to confirm if it’s throwing error or the pem is fine, if error then we need to move to step 2 to fix it:

ssh adam@  -i server-cert.pem

And here's the usual error that will throw if your pem file is not ready for SSH login.

You need to follow the next step to make your pem certificate ready to login to your server via SSH.

2. Open Windows Explorer, then right-click on the pem file, then select "Properties". Navigate to the "Security" tab, and click "Advanced"

3. Disable inheritance

4. Delete all permissions, so it doesn’t have any permission

5. Now add you as the only only owner. By click button Add and then Select a principal, then Advanced.
6. On the showing pop up, click Find now, then will show you list of users, select only you and click OK

7. On the basic permissions select full control, so all the permissions is checked

8. Then click Apply and OK

Now you can login SSH using pem certificate and without using password. You don’t need to repeat the process unless you move the pem file.

A Pem file is a container format that may just include the public certificate or the entire certificate chain (private key, public key, root certificates): Private Key. Server Certificate (crt, public key) (optional) Intermediate CA and/or bundles if signed by a 3rd party.

Popular posts from this blog

ERROR 1348 Column Password Is Not Updatable When Updating MySQL Root Password

How To Create Spring Boot Project Using Netbeans