SSH key and Putty key conversion on Linux

Install puttygen in Ubuntu by

#apt-get install putty-tools

The the .ppk file is used by the Putty application as a Private key File and it needs to converted to a SSH Private Key file for using it in SSH remote passwordless access. (SSH uses .pem file  for private key)

#puttygen keyfile.ppk -o id_rsa.pub -O public-openssh

Where “keyfile.ppk” is the PuTTY .ppk file to convert, and “id_rsa.pub” is the name of the converted key file.

Convert  .ppk (putty file)  TO  .pem (ssh private key)

#puttygen keyfile.ppk -o id_rsa -O private-openssh

Where “keyfile.ppk” is the key file that is to be converted to –  id_rsa which is the SSH private key. PuTTY stores both the private and public keys in the .ppk file, which is why you use the same file to convert both keys. You can now use both keys with OpenSSH.

Convert a .pem (ssh private key) TO .ppk (putty file) in Linux

#puttygen crowdfynd-stage.pem -o crowdfynd-stage.ppk

SSH ERROR : permission denied (public file)
This error happens for a variety of reasons — first we have to check is whether the user has a ssh login or not , then the private file mentioned in the command using -i flag shud be 600 etc are some of them.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s