{"id":812,"date":"2016-08-19T08:46:15","date_gmt":"2016-08-19T03:16:15","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=812"},"modified":"2026-11-03T13:26:18","modified_gmt":"2026-11-03T07:56:18","slug":"convert-ppk-key-to-pem-on-mac","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/convert-ppk-key-to-pem-on-mac\/","title":{"rendered":"Convert PPK Key to PEM on Mac"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Post Date:<\/strong> August 19, 2016<br><strong>Last Updated:<\/strong> November 2026<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you use PuTTY on Windows to connect to remote Linux servers, you may have a private key saved in the <code>.ppk<\/code> format. However, when connecting to servers through the macOS Terminal or OpenSSH, you may need to convert the key into a compatible format.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this guide, we will explain how to <strong>convert PPK key to PEM on Mac<\/strong> using PuTTYgen. We will install PuTTY through Homebrew, convert the private key, configure the correct file permissions, and verify the converted key using SSH.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This method is useful when migrating SSH access from Windows to macOS or when using an existing PuTTY private key with an OpenSSH-compatible client.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before converting the PPK key to PEM on Mac, ensure that you have:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>A Mac system with macOS installed.<\/li>\n\n\n\n<li>Homebrew package manager installed.<\/li>\n\n\n\n<li>An existing PuTTY private key file (<code>.ppk<\/code>).<\/li>\n\n\n\n<li>Access to the macOS Terminal.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">If Homebrew is not installed, follow the instructions on the official <a href=\"https:\/\/brew.sh\/\" target=\"_blank\" rel=\"noopener\">Homebrew website<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Implementation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Follow the steps below to convert your PPK private key into an OpenSSH-compatible private key on macOS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Open Terminal on Mac<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open the Terminal application on your Mac.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can find it under:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>Applications \u2192 Utilities \u2192 Terminal<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Alternatively, use Spotlight Search and type <code>Terminal<\/code> to open it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Install PuTTY Using Homebrew<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">PuTTY provides the PuTTYgen utility, which allows you to convert private keys between supported formats.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, install PuTTY using the Homebrew package manager:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">brew install putty<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After installation, verify that PuTTYgen is available:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">puttygen --version<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If the command displays the installed version, PuTTYgen is ready to use.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For more information, refer to the official <a href=\"https:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/\" target=\"_blank\" rel=\"noopener\">PuTTY documentation<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Navigate to the PPK Key Location<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Navigate to the directory containing your existing <code>.ppk<\/code> private key.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, if your key is stored in the Downloads directory, execute:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">cd ~\/Downloads<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You can list the files in the directory using:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ls -l<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure your PPK file is available before proceeding.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Convert the PPK Key to PEM Format<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Execute the following command to convert the PPK private key into an OpenSSH-compatible private key:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">puttygen key.ppk -O private-openssh -o key.pem<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Here:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>key.ppk<\/code> is your existing PuTTY private key file.<\/li>\n\n\n\n<li><code>-O private-openssh<\/code> specifies the OpenSSH private key output format.<\/li>\n\n\n\n<li><code>-o key.pem<\/code> specifies the output filename.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>key.ppk<\/code> with your actual private key filename.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">puttygen server-access.ppk -O private-openssh -o server-access.pem<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After executing the command, the converted private key will be saved as <code>server-access.pem<\/code> in the current directory.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> The <code>.pem<\/code> extension is the filename extension. The <code>private-openssh<\/code> option determines the actual key format generated by PuTTYgen.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Change the PEM File Permissions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">SSH requires private key files to have appropriately restricted permissions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Change the permissions of the newly generated PEM file using:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">chmod 600 key.pem<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command grants read and write permissions to the file owner while preventing access by other users.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Verify the permissions using:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ls -l key.pem<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The output should look similar to:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">-rw-------  1 user  staff  1675 Nov 2 18:00 key.pem<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The file should be accessible only to its owner.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 6: Verify the Converted PEM Key<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After converting the PPK key to PEM format, you can verify that the key works by connecting to your remote Linux server using SSH.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Execute:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ssh -i key.pem username@SERVER_IP<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>key.pem<\/code> with the converted private key filename.<\/li>\n\n\n\n<li><code>username<\/code> with the remote server&#8217;s SSH username.<\/li>\n\n\n\n<li><code>SERVER_IP<\/code> with the remote server&#8217;s IP address or hostname.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If the private key is valid and the server accepts the corresponding public key, the SSH connection should succeed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you receive a permission error, verify the file permissions and ensure that you are using the correct username, server address, and private key.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Important Security Notes<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When you convert a PPK key to PEM on Mac, remember that both files contain sensitive private key material.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Never share your private key through email, public repositories, or unsecured storage.<\/li>\n\n\n\n<li>Keep the original PPK file as a backup until the converted key has been tested successfully.<\/li>\n\n\n\n<li>Use <code>chmod 600<\/code> to restrict access to the converted private key.<\/li>\n\n\n\n<li>Do not modify or overwrite the original private key during conversion.<\/li>\n\n\n\n<li>Store private keys in a secure location on your Mac.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Converting a PPK key to PEM on Mac is straightforward using PuTTYgen and Homebrew. By installing PuTTY, executing the conversion command, and configuring the correct file permissions, you can use an existing PuTTY private key with the macOS OpenSSH client.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This process is particularly useful when migrating SSH access from Windows to macOS or managing remote Linux servers from different operating systems.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Frequently Asked Questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. Can I convert a PPK key to PEM on Mac?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. You can use PuTTYgen, which is included with PuTTY, to convert a PPK private key into an OpenSSH-compatible private key on macOS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. How do I install PuTTYgen on Mac?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can install PuTTY using Homebrew:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">brew install putty<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This installs PuTTYgen, which you can use to convert private keys.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3. What is the command to convert PPK to PEM on Mac?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use the following command:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">puttygen key.ppk -O private-openssh -o key.pem<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>key.ppk<\/code> with your source key filename and <code>key.pem<\/code> with your preferred output filename.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">4. Why do I need to run chmod 600 on a PEM file?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>chmod 600<\/code> command restricts the private key file permissions to its owner. SSH may reject a private key if its permissions allow other users to access it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">5. Can I use the converted PEM key with SSH on Mac?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. The converted OpenSSH private key can be used with the macOS SSH client, provided the corresponding public key is authorized on the remote server.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">6. Does converting PPK to PEM change the SSH key?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The conversion changes the private key&#8217;s file format, not the underlying key pair. The corresponding public key remains associated with the same private key.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Related Articles<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-ssh-remote-server-via-terminal\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to SSH remote server via Terminal<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-troubleshoot-ssh-connection-issues-in-aws-ec2\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Troubleshoot SSH Connection Issues in AWS EC2<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Talk to Our Technology Experts<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Need help managing SSH keys, securing remote access, or administering your Linux servers? Our team can set up key-based authentication, harden your SSH configuration, and protect your server access with our <a href=\"https:\/\/pheonixsolutions.com\/security\/\">Security Services<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/contact\">Connect with our technology experts.<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Post Date: August 19, 2016Last Updated: November 2026 Introduction If you use PuTTY on Windows to connect to remote Linux [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":12880,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[],"class_list":["post-812","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-architecture","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-d6","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/08\/Convert-PPK-to-PEM-on-Mac.png","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/812","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=812"}],"version-history":[{"count":1,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/812\/revisions"}],"predecessor-version":[{"id":12794,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/812\/revisions\/12794"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media\/12880"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=812"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=812"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}