Samsara

Life, the universe and everything.

Tuesday, September 06, 2005

ssh problems, too many authentication failures

I just got this error. First host I got this was a machine I never logged in to, not even a chance to give my password, so ignored it.
Second host was a machine I did log into and running on my LAN.
This could only mean there were too many keys in my keychain and it tried them all, one after the other, till the server said: enough already.

After reading man ssh_config it looked straightforward.
Adding the following to ~/.ssh/config did the trick.
Host blah
IdentityFile ~/.ssh/keyforblah
IdentitiesOnly Yes

Voila.
Everything works.
Need to do this for all hosts, luckily you can use wildcards in the Host section.