Initial Server Setup with Ubuntu 20.04

I followed your guidance but when i give "ssh $USER@DropletIP " i got message as "$USER@DropletIP Permission Denied (Publick key) what is the wrong. let me know step by step instruction to correct the issue. i am new

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.

Hi there,

It sounds like that the file permissions for your SSH key might be too open. You would need to use the following commands to make them more secure:

chown 700 /home/janaka/.ssh
chown 600 /home/janaka/.ssh/authorized_keys

I could also suggest following the steps from this video here for a better understanding of the whole process:

Regards, Bobby

Hello, @jkamalgoda

What you can do is to add the -vvv argument to the ssh command in order to get more verbose output. This will also give some additional information about the issue and we can then troubleshoot the issue.

An example command will be:

ssh -vvv $USER@DropletIp

Feel free to share the output of the command here.

Also as per Bobby’s comment make sure to check the ssh-key file’s permissions.

Regards, Alex