Dropbear key authentication still asks for password

Hey everyone,

I am trying to ssh from my linux machine into my openwrt router using ssh without entering a password. I have read openwrt-guide-dropbear.public-key.auth but I still encounter a problem.

I am on openwrt-19.07 and i have used ssh-copy-id to copy my public ssh-key (RSA-4096bit) to the openwrt router. The public key is then available in Luci and can be found in /etc/dropbear/authorized_keys, where the permissions for /etc/dropbear are 700 and for /etc/dropbear/authorized_keys are 600 and is owned by root:root.

When I try to ssh into my router using ssh@openwrt.lan it prompts me again for the password:

[10:00] ~/.ssh:  ssh -i openwrt root@openwrt.lan                 
root@openwrt.lan's password: 

Can anyone tell me what I am doing wrong?

Thanks in advance for any advices

Did you copy the same identity key you use below?

Two options to troubleshoot:

  1. Open second ssh session (login with password) and then check the logs while logging in.
  2. Run ssh in more verbose mode with ssh -vvv
2 Likes

ssh-copy-id did not work for me.

I had to manually copy and paste my key into the Luci Admin SSH Keys screen.

1 Like