Can someone tell my what is wrong when I try to login into my raspberry with SSH:

Debug info:

enter image description here enter image description here enter image description here I have followed this guide ubuntu guide for ubuntu core and for ubuntu ssh keys. Can see on google that a lot of users have this issue.

Thanks, Nenad

nedad@Dragic-Home-I:~/.ssh$ ssh -vvv nedad@
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to [] port 22.
debug1: Connection established.
debug1: identity file /home/nedad/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file /home/nedad/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/nedad/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/nedad/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/nedad/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/nedad/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/nedad/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/nedad/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to as 'nedad'
debug3: hostkeys_foreach: reading file "/home/nedad/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /home/nedad/.ssh/known_hosts:1
debug3: load_hostkeys: loaded 1 keys from
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com,zlib
debug2: compression stoc: none,zlib@openssh.com,zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
  • 3
    Please post text, not images. Nobody can read this – Thomas Weller Mar 21 '20 at 13:35
  • I get an error that I am poisting spam. – Nenad Mar 21 '20 at 14:02
  • Let me try again: – Nenad Mar 21 '20 at 14:02
  • Now with out any errors;) – Nenad Mar 21 '20 at 14:04
  • Generate a new key, perhaps? – user96931 Mar 23 '20 at 18:27

You should be able to set the PreferredAuthentications key in your servers (Pi) /etc/sshd/ssh_config by adding the line

PreferredAuthentications publickey

and then restarting the ssh-daemon (sudo systemctl restart sshd) or just rebooting.

You could also try to log in with this option added to the ssh command and explicitly specifying the private keyfile (normally located at ~/.ssh/)

ssh -o PreferredAuthentications=publickey -i [path/to/your/key] nedad@
  • Trying to use the ssh preferredAuthentication I receive "Permission denied (publickey,password). What does it mean? – gavioto20 Sep 28 '20 at 5:21

As seen from the debug log there is an identity file /home/nedad/.ssh/id_ed25519-cert used for authentication. The log doesn't show that it is denied or accepted and have not finished messages. You should paste the complete log output to the question.

B.t.w., using a private keyfile for authentication like you do, it is normal that it is protected with a password to use it. This is not a password to authenticate against the ssh server. It is only a password to enable the key file to be used to authenticate against the ssh server. If you do not want to enter a password you can clear it on the keyfile with a security risk. Then everyone getting this keyfile is able to get into your ssh server.

You can clear the password on the keyfile with:

rpi ~$ ssh-keygen -p

This will then prompt you to enter the keyfile location, the old passphrase, and the new passphrase, which can be left blank to have no passphrase.

How do I remove the passphrase for the SSH key


It works fine when I create a key with PuTTYgen. So it works fine now.

Thans for yours help, Nenad

  • 1
    You can accept your own answer to this question -- otherwise it will remain unanswered and re-appear in the feed over and over and over... – Roger Jones Mar 23 '20 at 8:56
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year. – Ingo Mar 24 '20 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.