ssh root@server Permission denied (publickey).

July 6, 2018 634 views
Security Ubuntu 16.04

Why find .ssh/iddsa file. there is no such a file. just idrsa.

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 username
usermod -aG sudo user
name

OpenSSH7.6p1, LibreSSL 2.6.2
debug1: Reading configuration data /etc/ssh/ssh
config
debug1: /etc/ssh/sshconfig line 48: Applying options for *
debug2: ssh
connectdirect: 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/iddsa
debug3: no such identity: /Users/happy/.ssh/id
dsa: No such file or directory
debug1: Trying private key: /Users/happy/.ssh/idecdsa
debug3: no such identity: /Users/happy/.ssh/id
ecdsa: No such file or directory
debug1: Trying private key: /Users/happy/.ssh/ided25519
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).

1 Answer

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

Have another answer? Share your knowledge.