Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Caio Cesar
Caio Cesar

Posted on • Edited on

     

Generating SSH Certificate in Windows

Software Requirements

Download and installOpen SSL

Download and installPutty Gen

Alt Text

Configuration

Find the OpenSSL installation folder such as:
C:\Program Files\OpenSSL-Win64\bin\

Create a folder named 'cert' inside bin folder.

Open the command prompt as administrator and navigate to the OpenSSL bin folder

cd C:\Program Files\OpenSSL-Win64\bin\
Enter fullscreen modeExit fullscreen mode

Generate the private key and the CRT in the cert folder:

openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout cert/privateKey-example.key -out cert/certificate-example.crt
Enter fullscreen modeExit fullscreen mode

Generate the PFX certificate:

openssl pkcs12 -export -out cert/certificate-example.pfx -inkey cert/privateKey-example.key -in cert/certificate-example.crt
Enter fullscreen modeExit fullscreen mode

At this poin 3 files should be generated in the cert folder:

Alt Text

Generate a PKCS#1 Private key

openssl pkcs12 -in cert/certificate-example.pfx -nocerts -out cert/privateKey-example.pem
Enter fullscreen modeExit fullscreen mode

Decrypt the private key to generate the ppk

openssl rsa -in cert/privateKey-example.pem -out cert/teste-privateKey-example-decrypted_key.pem
Enter fullscreen modeExit fullscreen mode

Execute the Putty Gen program and load the decrypted private key
Save the new private and public key as ppk.

Alt Text

At this point the public and private key could be used for SFTP authentication.

Alt Text

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Software Architect | Researcher
  • Education
    Computer Science
  • Work
    Software Architect
  • Joined

More fromCaio Cesar

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp