Re: Git SSH Authentication

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Git SSH Authentication

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:03

Sitaram Chamarty [off-list ref] writes:
Common causes of pubkey access fail:

  - wrong pubkey being offered: if you are using ssh-agent, make sure
you have 'ssh-add'ed the key you want to offer.  Confirm with 'ssh-add
-l'
A failure related to this I saw is to have (too) many keys in ssh-agent,
and running ssh without telling it which exact key to use.  The client
tries each key in turn and the server rejects the connection attempt after
seeing too many keys tried.  "ssh -v" is useful to diagnose this mode of
failure, and an entry in ~/.ssh/config like:

    Host example.com
	User myusernameoverthere
        IdentityFile ~/.ssh/id_rsa-for-example.com

would fix it.

Re: Git SSH Authentication

From: Sitaram Chamarty <hidden>
Date: 2016-06-15 22:53:03

On Sat, Feb 11, 2012 at 1:24 PM, Junio C Hamano [off-list ref] wrote:
Sitaram Chamarty [off-list ref] writes:
quoted
Common causes of pubkey access fail:

  - wrong pubkey being offered: if you are using ssh-agent, make sure
you have 'ssh-add'ed the key you want to offer.  Confirm with 'ssh-add
-l'
A failure related to this I saw is to have (too) many keys in ssh-agent,
and running ssh without telling it which exact key to use.  The client
tries each key in turn and the server rejects the connection attempt after
seeing too many keys tried.  "ssh -v" is useful to diagnose this mode of
failure, and an entry in ~/.ssh/config like:

   Host example.com
       User myusernameoverthere
       IdentityFile ~/.ssh/id_rsa-for-example.com

would fix it.
Interesting... I didn't know this, so I checked man sshd_config
looking for exactly how many keys it would fail after.  The setting
seems to be MaxAuthTries, and defaults to 6.

-- 
Sitaram
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help