Can't connect using ssh keys to dropbear

1

I have two pair of (same) embedded device that runs linux. I have setup the same ssh key on both. I can connect to one using that key but the 2nd machine still ask for password. Obviously I am doing it right on first machine so its working but why is it not working on the 2nd machine? My client is windows 7 machine (the one I am connecting from).

On windows: I have .ssh\id_dsa (private key) and corresponding config file.

I have moved public key (id_dsa.pub file) to both linux machines using scp at /root/.ssh/authorized_keys file . I make sure I do exactly the same thing both places.

I have checked on file permissions on the server (root, .ssh folders and authorized_keys file) and I make sure they are identical on both machines. My question is why does the key work in one machine but doesn't seem to work the other?

I am using OpenSSH (part of MingW) on Windows 7 to connect.

zar

Posted 2015-07-31T03:17:03.907

Reputation: 873

same permission (drwx----) on /root/.ssh ? same configuration file /etc/ssh/sshd_config ? – Archemar – 2015-07-31T07:51:29.037

@Archemar /root/.ssh is drwxr-xr-xand this is same on both units. I don't have /etc/sshfolder, should I create one? – zar – 2015-07-31T14:08:27.513

directory /root/.ssh should be drwx------ (that is chmod 700 /root/.ssh ), try this first. – Archemar – 2015-07-31T14:09:50.243

@Archemar I set 700 on /root/.ssh and 600 on authorized_keys, no difference. I also than went to to do 700 on /root still no change. – zar – 2015-07-31T14:28:32.250

We figured it out. the root was not owned by root on the unit, fixing that fixed everything. – zar – 2015-07-31T19:56:18.697

No answers