Have a strange problem i cant get my head around.
I have a Debian (6.0.1 Squeeze) server and a Kubuntu (11.04 Natty Narwhal) client machine up and running.
Trying to create a pubkey login from client and it works perfectly with user1(uid 1000), however with user2(uid 1002) it fails.
Starting from scratch without any .ssh folders in client home or any of the users on server.
On the client i run
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa
ssh-copy-id
user1@debian.server.com
ssh-copy-id
user2@debian.server.com
ssh
user1@debian.server.com - works fine
ssh
user2@debian.server.com - requires password?
Debug for user1
debug1: Offering RSA public key: /home/daniel_andersson/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug2: input_userauth_pk_ok: fp <key>
debug3: sign_and_send_pubkey: RSA <key>
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
Debug for user2
debug1: Offering RSA public key: /home/username/.ssh/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/username/.ssh/id_dsa
debug3: no such identity: /home/username/.ssh/id_dsa
debug1: Trying private key: /home/username/.ssh/id_ecdsa
debug3: no such identity: /home/username/.ssh/id_ecdsa
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
Diff shows that on server /home/user1/.ssh/authorized_keys /home/user2/.ssh/authorized_keys are identical
And on client known_hosts got two keys that looks correct
Nothing in the sshd_config or pam auth for sshd that is userspecific as i can see.
Anyone know what the problem might be?
Solved:
Problem was incorrect permissions on the home folder.