Skip to content

Instantly share code, notes, and snippets.

@LowerDeez
Forked from innocuo/convert_key.sh
Last active December 28, 2019 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LowerDeez/ba362859abe49c67b5d892b31c3f46df to your computer and use it in GitHub Desktop.
Save LowerDeez/ba362859abe49c67b5d892b31c3f46df to your computer and use it in GitHub Desktop.
Convert PuTTY .ppk key to OpenSSH in Ubuntu
sudo apt-get install putty-tools
# Place your keys in some directory, e.g. your home folder. Now convert the PPK keys to SSH keypairs:cache search
# To generate the private key:
puttygen your_private_key.ppk -O private-openssh -o your_new_key
chmod 600 your_new_key
# Move these keys to ~/.ssh and make sure the permissions are set to private for your private key:
mkdir -p ~/.ssh
mv -i ~/id_dsa* ~/.ssh
chmod 600 ~/.ssh/id_dsa
#based on answer at superuser
#https://superuser.com/questions/232362/how-to-convert-ppk-key-to-openssh-key-under-linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment