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.

  • same permission (drwx----) on /root/.ssh ? same configuration file /etc/ssh/sshd_config ?
    – Archemar
    Commented Jul 31, 2015 at 7:51
  • @Archemar /root/.ssh is drwxr-xr-xand this is same on both units. I don't have /etc/sshfolder, should I create one?
    – zar
    Commented Jul 31, 2015 at 14:08
  • directory /root/.ssh should be drwx------ (that is chmod 700 /root/.ssh ), try this first.
    – Archemar
    Commented Jul 31, 2015 at 14:09
  • @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
    Commented Jul 31, 2015 at 14:28
  • We figured it out. the root was not owned by root on the unit, fixing that fixed everything.
    – zar
    Commented Jul 31, 2015 at 19:56


You must log in to answer this question.

Browse other questions tagged .