Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/ @ 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?

share|improve this question
check the configurations of the servers to ensure you have them both setup the same way. – cprofitt Nov 17 '13 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. – SandFox Nov 20 '13 at 9:52
up vote 2 down vote accepted

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

share|improve this answer
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 '13 at 17:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.