Permission denied (publickey) for SSH login on new droplet. Unable to login

Created a new account. Created SSH keys on local machine under a root secured password. Added newly created SSH key under Security -> Add SSH keys. Created a new droplet. Installed one-click wordpress.

When I am trying to login via SSH I am getting an error saying Permission denied (publickey)

~$ ssh

The authenticity of host ‘’ can’t be established.

ECDSA key fingerprint is…

Are you sure you want to continue connecting (yes/no)? y

Please type ‘yes’ or ‘no’: yes

Warning: Permanently added ‘’ (ECDSA) to the list of known hosts. Permission denied (publickey).

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

If you have not done any work yet I recommend you just delete the droplet then double check your ssh key, finally create it again. You will only be charged for the hours you have had it for not for the month.