<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Anchor Web Hosting Blog &#187; authentication failure</title>
	<atom:link href="http://www.anchor.com.au/blog/tag/authentication-failure/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anchor.com.au/blog</link>
	<description>A view into the Anchor Engineroom</description>
	<lastBuildDate>Wed, 08 Feb 2012 00:51:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>ERROR: SSH agent has too many keys</title>
		<link>http://www.anchor.com.au/blog/2009/12/error-ssh-agent-has-too-many-keys/</link>
		<comments>http://www.anchor.com.au/blog/2009/12/error-ssh-agent-has-too-many-keys/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 00:17:25 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[WTF]]></category>
		<category><![CDATA[authentication failure]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.anchor.com.au/blog/?p=1400</guid>
		<description><![CDATA[Unfortunately, SSH doesn&#8217;t produce this error, although it darn well should&#8230; I just had a Github customer report that they couldn&#8217;t access their repos via SSH, despite it all working properly yesterday, and &#8220;not having changed anything&#8221;. A bit of debug logging and an inspired leap of intuition on the part of another sysadmin in [...]]]></description>
			<content:encoded><![CDATA[<p>Unfortunately, SSH <em>doesn&#8217;t</em> produce this error, although it darn well should&#8230;</p>
<p>I just had a Github customer report that they couldn&#8217;t access their repos via SSH, despite it all working properly yesterday, and &#8220;not having changed anything&#8221;.  A bit of debug logging and an inspired leap of intuition on the part of another sysadmin in the office, and the answer was quickly found.</p>
<p>First off, the symptoms:</p>
<ul>
<li>Debug logging showed that the user was connecting successfully, presenting six SSH keys (none of which were the key of interest) before disconnecting;
<li>The SSH key was in the user&#8217;s SSH agent (you can verify this with a quick <tt>ssh-add -l</tt>);</li>
<li><em>There were more than six keys in the SSH agent</em></li>
</ul>
<p>This last symptom is the key point.  As an anti-brute-force measure (I assume), SSH won&#8217;t allow a user to connect and present more than <tt>MaxAuthTries</tt> credentials (whether they be passwords or keys) before being forcibly disconnected.  The default value for this parameter (if you haven&#8217;t realised already) is six.</p>
<p>Whilst this makes a lot of sense for passwords (and a lesser, but still valid, measure for keys) it does mean that you effectively have a hard limit of six keys in your agent simultaneously (at least without using SSH configs to specify a single key to present to the server).  Any more than six keys, and you run the very real risk that the key you need to give to a particular server will be number seven in your agent, and all your authentications will fail miserably.</p>
<p>Bumping the value of <tt>MaxAuthTries</tt> to a much larger value works fine for Github &#8212; password auth is disabled, and if you can manage to brute force a key you&#8217;re welcome to what you can get &#8212; but you certainly can&#8217;t rely on inflating <tt>MaxAuthTries</tt> everywhere to get you out of trouble, so: <b>keep those SSH agents lean</b>, or at least specify <tt>IdentityFile</tt> for all your servers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.anchor.com.au/blog/2009/12/error-ssh-agent-has-too-many-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

