Question

ssh root@server Permission denied (publickey).

Why find .ssh/id_dsa file. there is no such a file. just id_rsa.

So the issue is that I can login to my server just fine using:

ssh root@SERVER_IP_ADRESS

But when I try to login with a user I created from root:

ssh USERNAME@SERVER_IP_ADRESS5 I get:

Permission denied (publickey).

The steps I went through before this.

SSH generated a key Created an Ubuntu 16.04 droplet with given SSH key. SSH into server with root

$ adduser user_name usermod -aG sudo user_name

OpenSSH_7.6p1, LibreSSL 2.6.2 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 48: Applying options for * debug2: ssh_connect_direct: needpriv 0 debug1: Connecting to cleanproject port 22. debug1: Connection established. debug1: identity file /Users/happy/.ssh/id_rsa type 0 … … debug1: Authentications that can continue: publickey debug1: Trying private key: /Users/happy/.ssh/id_dsa debug3: no such identity: /Users/happy/.ssh/id_dsa: No such file or directory debug1: Trying private key: /Users/happy/.ssh/id_ecdsa debug3: no such identity: /Users/happy/.ssh/id_ecdsa: No such file or directory debug1: Trying private key: /Users/happy/.ssh/id_ed25519 debug3: no such identity: /Users/happy/.ssh/id_ed25519: No such file or directory debug2: we did not send a packet, disable method debug1: No more authentication methods to try. root@cleanproject: Permission denied (publickey).

Subscribe
Share

Submit an 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.

Be sure to give the http link and not the ssh link. I solved the permission key issue with that