Initial Server Setup with Ubuntu 20.04

Posted April 18, 2021 472 views
UbuntuGetting StartedInitial Server SetupUbuntu 20.04DigitalOcean Droplets

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

edited by alexdo

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.

Submit an Answer
2 answers

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:


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.