1

I'd like to connect 4 hosts with paswordless SSH. I generate public RSA key with ssh-keygen command, then copy this keyfile to the other machines with ssh-copy-id -i ~/.ssh/id_rsa.pub @ command. When I try ssh to first two hosts, it's working, not ask password for login, but the third one still need key. When I try to login to the two working hosts with ssh -v command, the host accept the key,

debug1: Offering public key: /home//.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa * *

but the other offer the key, skip accept, and try to ask .ssh/identity and .ssh/id_rsa keys.

debug1: Offering public key: /home/hadoop/.ssh/id_rsa
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password

How should I do this?

2
  • check the configurations of the servers to ensure you have them both setup the same way.
    – cprofitt
    Nov 17, 2013 at 15:06
  • I checked the ssh config files on all computer (/etc/ssh/sshd_config and /etc/ssh/ssh_config), but no difference between them. Then I checked the permission of ./ssh/* files, but they are same too.
    – user216626
    Nov 20, 2013 at 9:52

1 Answer 1

2

I solved it! The problem caused by the user library has group write-read-execution permissions. I changed it to rwx------, then it works.

1
  • thanks for solving this yourself and documenting the answer. So many times people do not do that and leave a question unanswered.
    – cprofitt
    Dec 1, 2013 at 17:53

You must log in to answer this question.