SSH - Permission denied (cannot authenticate git@github.com) via CMD -


i'm on windows xp. i'm facing weired problem when try connect git@github.com using bash ssh -v git@github.com i'm able connect when trying connect via cmd on same machine i'm getting message permission denied.

on debugging found in case of bash, ssh checking id_rsa key in case of cmd ssh checking github_rsa. not trying check id_rsa. below logs.

openssh_4.6p1, openssl 0.9.8e 23 feb 2007 debug1: reading configuration data /etc/ssh/ssh_config debug1: applying options * debug1: applying options github.com debug1: connecting github.com [204.232.175.90] port 22. debug1: connection established. debug1: identity file /c/documents , settings/username/.ssh/github_rsa type 1 debug1: remote protocol version 2.0, remote software version openssh_5.5p1 debia n-6+squeeze1+github12 debug1: match: openssh_5.5p1 debian-6+squeeze1+github12 pat openssh* debug1: enabling compatibility mode protocol 2.0 debug1: local version string ssh-2.0-openssh_4.6 warning: permanently added 'github.com,204.232.175.90' (rsa) list of known hosts. debug1: ssh_rsa_verify: signature correct debug1: authentications can continue: publickey debug1: next authentication method: publickey debug1: offering public key: /c/documents , settings/username/.ssh/github_rsa debug1: server accepts key: pkalg ssh-rsa blen 277 debug1: read pem private key done: type rsa debug1: authentications can continue: publickey debug1: no more authentication methods try. permission denied (publickey). 

please suggest possible case. suggests check file permissions on key. both keys have same file permissions i.e. -rw-r--r--

below updated code after making changes mentioned @naomi

openssh_4.6p1, openssl 0.9.8e 23 feb 2007 debug1: reading configuration data /etc/ssh/ssh_config debug1: applying options * debug1: applying options github.com debug1: connecting github.com [204.232.175.90] port 22. debug1: connection established. debug1: identity file /c/documents , settings/username/.ssh/github_rsa type 1 debug1: identity file /c/documents , settings/username/.ssh/id_rsa type 1 debug1: remote protocol version 2.0, remote software version openssh_5.5p1 debian-6+squeeze1+github12 debug1: match: openssh_5.5p1 debian-6+squeeze1+github12 pat openssh* debug1: enabling compatibility mode protocol 2.0 debug1: local version string ssh-2.0-openssh_4.6 warning: permanently added 'github.com,204.232.175.90' (rsa) list of known hosts. debug1: ssh_rsa_verify: signature correct debug1: authentications can continue: publickey debug1: next authentication method: publickey debug1: offering public key: /c/documents , settings/username/.ssh/github_rsa debug1: server accepts key: pkalg ssh-rsa blen 277 debug1: read pem private key done: type rsa debug1: authentications can continue: publickey debug1: offering public key: /c/documents , settings/username/.ssh/id_rsa debug1: authentications can continue: publickey debug1: no more authentication methods try. permission denied (publickey). 

look in file

/etc/ssh/ssh_config 

it has entry in github telling id file is. change 1 want use

if doesn't work can copy id_rsa github_rsa ...


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -