Report this

What is the reason for this report?

Initial Server Setup with Ubuntu 20.04

Posted on April 18, 2021

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



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!

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.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.