Logging in using ppk file that contains public key

October 15, 2014 9.3k views


I just received a PPK file that has both public and private key to use to authenticate when logging in to the droplet using SSH.

I'm having problems figuring out how to use the key file given to me.

I've logged in to our account and went to the 'SSH Keys' section on the left menu. When I click on 'Add SSH Key' I put the public key as per instructions I read online and gave it a random name as well in the respective fields... after I hit create SSH key it gives me an error message saying "Key invalid type, we support 'ssh-rsa', 'ssh-dss', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'".

Can anyone tell me what I'm doing wrong and how I can fix it please. Thanks

4 Answers

Let open your file private key with PuTTY and copy your public key in form. Do not open it with Notepad, Sublime Text,...

If you open and copy it with notepad++, you will get this error. Because it is not in a correct format.

first u have to create ssh key then only u can do that
please go through this link https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-putty-on-digitalocean-droplets-windows-users

by Justin Ellingwood
PuTTY is a Windows program used to establish SSH sessions with Linux servers. In this guide, we'll demonstrate how to use PuTTY to create SSH key pairs to use within the DigitalOcean interface. You can then easily create servers that you can log into without a password.

The Best way that i found is in the puttygen itself it has a option of copy pasting the OpenSSH public key..copy the key and then paste it in the Digital Ocean SSH Key.

After going through several possible configurations, I found that this works...

  • Using 'Putty Keygen'
  • Click 'Key' and change that to 'SSH-2 ECDSA KEY'
  • Set the 'Parameter' at the bottom to ECDSA
  • Set the 'Curve' (it will be available after you set the key type in a drop down) to 'nistp256'
  • Generate your key
  • Add your Password
  • Save the public/private keys
  • Upload the 'Public' key.
Have another answer? Share your knowledge.