• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
OpenTechTips

OpenTechTips

Short Guides for IT Professionals

MENUMENU
  • HOME
  • ALL TOPICS
    • Active Directory
    • Exchange
    • InfoSec
    • Linux
    • Networking
    • Scripting
      • PowerShell
    • SSL
    • Virtualization
    • Web
    • Tools
  • ABOUT
  • SUBSCRIBE
Home » Convert OPENSSH key to RSA type

Convert OPENSSH key to RSA type

May 13, 2022 - by Zsolt Agoston - last edited on May 13, 2022

By default the ssh-keygen utility stores our public key in the Base64 encoded OPENSSH format. However many SSH utilities in our Windows system can only read RSA format.

To convert the file first duplicate the private key you want to convert!

It's an important step to conserve the original file because the command will overwrite the file it's run on.

# Convert private key to RSA type
ssh-keygen -p -m pem -f [private key file]

Example

In this example we have the private key as id_rsa in our default .ssh directory in our profile, which we copy in PrivKey.pem.

This PrivKey.pem file is then converted to RSA type:

# Convert PrivKey.pem
cd ~\.ssh\
cp id_rsa PrivKey.pem
ssh-keygen -p -m pem -f PrivKey.pem

Reader Interactions

Community Questions Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Tools

Secondary Sidebar

  • Terms of Use
  • Disclaimer
  • Privacy Policy