Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Server (Ubuntu):

~/.ssh/authorized_keys file (on issue-user):

  • just one public key on one single line. No extra lines! No comments!
  • correct user/group owner
  • 644 rights

Local Machine (Windows 7):

  • works with the git user on the same server
  • doesn't work with the issue-user
  • the key pairs match

After running ssh issue-user@domain.com -vvv:

debug2: key: /c/***/***/.ssh/identity (0x0)
debug2: key: /c/***/***/.ssh/id_rsa (0x0)
debug2: key: /c/***/***/.ssh/id_dsa (0x0)
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /c/***/***/.ssh/identity
debug3: no such identity: /c/***/***/.ssh/identity
debug1: Trying private key: /c/***/***/.ssh/id_rsa
debug1: read PEM private key done: type RSA
debug3: sign_and_send_pubkey
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /c/***/***/.ssh/id_dsa
debug3: no such identity: /c/***/***/.ssh/id_dsa
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

The id_rsa key file is definitely there: /c/***/***/.ssh/id_rsa

share|improve this question
    
Can you compare permissions on keys, parent directories and home directories of the two mentioned users? My server (Gentoo) explicitly forbids publicly readable keys. Permissions on home must be o-rwx, on .ssh directory holding keys permissions are 0700 and on the key file authorized_keys permissions are 0640. SSH would log such problem into auth.log (depending on your syslog configuration). –  Aleš Krajník Sep 19 '13 at 10:38
    
@AlešKrajník - it works. thanks. you can provide as answer if you want accept. –  user1236048 Sep 19 '13 at 10:43
    
Provided, thanks! :-) –  Aleš Krajník Sep 19 '13 at 10:46

1 Answer 1

up vote 1 down vote accepted

There is a problem in permissions on keys, parent directories and/or home directories of the two mentioned users. My server (Gentoo) explicitly forbids publicly readable keys.

Permissions on home should be o-rwx, on .ssh directory holding keys permissions should be 0700 and on the key file authorized_keys permissions should be 0640.

SSHD would log such problem into auth.log (depending on your syslog configuration).

share|improve this answer

Your Answer

 
discard

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.