Andrew Fletcher published: 24 May 2022 1 minute read
How do you generate a .pem file from an existing .ppk key?
Is putty on your mac?
Check by running the command
puttygen -V
Which will generate a response similar to
puttygen: Release 0.76
Build platform: 64-bit Unix
Compiler: clang 12.0.5 (clang-1205.0.22.9)
Source commit: 1fd7baa7344bb....
Don't have Putty, well easily fixed with homebrew.
brew install putty
Generate the key
We will use puttygen to generate the key.
puttygen key.ppk -O private-openssh -o key.pem
key.ppk | the original file path and name of the ppt file |
-O private-openssh | the output type. private-openssh is used to save an SSH-2 private key in OpenSSH’s format |
-o key.pem | the output file path and name of the new pem file |
In my case the CLI became
puttygen /Users/andrewfletcher/Sites/PEM/AMH.ppk -O private-openssh -o /Users/andrewfletcher/Sites/PEM/AMH.pem
Usage and access to the remote staging server
With the rem file generated, time to test the login process.
ssh {username}@{remote-server-ip} -i /Users/andrewfletcher/Sites/PEM/{filename}.pem
Replace
{username} | Remote server's access username |
{remote-server-ip} | Of course the IP address of the remote server |
{filename} | The path and rem file name |
Related articles
Andrew Fletcher
•
16 Jan 2025
get IP address from terminal OSX
When troubleshooting network issues or configuring devices, knowing your IP address can be essential. Whether you're connected via Wi-Fi, Ethernet, or tethering through a mobile provider, macOS offers powerful built-in tools to quickly identify your IP address. Here's a practical guide tailored to...
Andrew Fletcher
•
07 Jan 2025
Managing DDEV environment troubleshooting and setting up multiple Drupal projects
DDEV has become a popular tool for local web development, offering a streamlined approach to managing Docker-based environments. However, setting up and managing DDEV projects, particularly with the latest versions of Docker Desktop, can present challenges. This article guides you through resolving...
Andrew Fletcher
•
28 Dec 2024
Optimising file transfers by improving efficiency from cp to rsync
Transferring files between development and production environments is a critical task in the deployment process. However, I continue to come across multiple approaches that scale from awesome automation using pipelines to the basic of direct command line entry. Where the basic approaches rely on...