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.
same permission (
drwx----
) on/root/.ssh
? same configuration file/etc/ssh/sshd_config
? – Archemar – 2015-07-31T07:51:29.037@Archemar
/root/.ssh
isdrwxr-xr-x
and this is same on both units. I don't have/etc/ssh
folder, should I create one? – zar – 2015-07-31T14:08:27.513directory
/root/.ssh
should bedrwx------
(that ischmod 700 /root/.ssh
), try this first. – Archemar – 2015-07-31T14:09:50.243@Archemar I set 700 on
/root/.ssh
and 600 onauthorized_keys
, no difference. I also than went to to do 700 on/root
still no change. – zar – 2015-07-31T14:28:32.250We figured it out. the root was not owned by root on the unit, fixing that fixed everything. – zar – 2015-07-31T19:56:18.697