Question

Use keys with SSH

<^>Used Putty.gen to create Putty private and public keys. On client system \karpov in \Users\xyz.ssh I have “id_rsa”, “id_rsa.ppk”, “id_rsa.pub”, “known_hosts”.

“id_rsa” contents from private Putty file and “id_rsa.pub” from public Putty file.

When I try to run ssh clientusername@clientsystem@server name, I get "load pubkey “C:\Users\Harmonia12/.ssh/id_rsa” : invalid format thespar@karpov@archon’s password. When I try to type a password, the keyboard is not active–I can’t type into the PowerShell window.

What file has “invalid format”? What is the valid format?


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
October 5, 2023

Heya,

The error message you’re seeing is due to the use of the PuTTY-generated private key format which is not directly compatible with OpenSSH’s ssh client. The OpenSSH client expects the private key to be in the OpenSSH format, not in PuTTY’s PPK format.

I’ll recommend you to generate a new key directly from the Droplet and add the Private part to filezilla and leave the public to your Droplet. You can check this article here:

https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-on-ubuntu-22-04

Additionally, here is how you can access your Droplet without putty until you generate the keys:

https://docs.digitalocean.com/products/droplets/how-to/connect-with-console/

alexdo
Site Moderator
Site Moderator badge
October 4, 2023

Heya, @johannaharmonia

You can try to generate a new ssh-key pair and upload it to your droplet.

https://docs.digitalocean.com/products/droplets/how-to/add-ssh-keys/to-existing-droplet/

Also keep in mind that ssh-clients will not display the password characters during the password prompt, but the characters itself are accepted, so after you’re done typing you can hit enter.

Hope that this helps!

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel