<p>On Mar 31, 2012 6:44 AM, &quot;Andy Grimm&quot; &lt;<a href="mailto:agrimm@gmail.com">agrimm@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; SOLVED!<br>
&gt;<br>
&gt; From /usr/share/doc/cloud-init-0.6.3/ChangeLog :<br>
&gt;<br>
&gt; &quot;read /etc/ssh/sshd_config for AuthorizedKeysFile rather than assuming<br>
&gt; ~/.ssh/authorized_keys (LP: #731849)&quot;<br>
&gt;<br>
&gt; The problem is that this change in cloud-init does not properly handle<br>
&gt; relative paths, which are documented in the sshd_config manpage as<br>
&gt; being relative to the user&#39;s home directory.  So the quick fix was to<br>
&gt; change /etc/ssh/sshd_config from:<br>
&gt;<br>
&gt; AuthorizedKeysFile      .ssh/authorized_keys<br>
&gt;<br>
&gt; to:<br>
&gt;<br>
&gt; AuthorizedKeysFile      %h/.ssh/authorized_keys<br>
&gt;<br>
&gt; The more correct fix is in cloud-init, probably something like:<br>
&gt;<br>
&gt; --- a/cloudinit/SshUtil.py      2012-03-31 09:28:42.598996936 -0400<br>
&gt; +++ b/cloudinit/SshUtil.py      2012-03-31 09:40:47.758829938 -0400<br>
&gt; @@ -155,6 +155,8 @@<br>
&gt;         akeys = ssh_cfg.get(&quot;AuthorizedKeysFile&quot;, &quot;%h/.ssh/authorized_keys&quot;)<br>
&gt;         akeys = akeys.replace(&quot;%h&quot;, pwent.pw_dir)<br>
&gt;         akeys = akeys.replace(&quot;%u&quot;, user)<br>
&gt; +        if not akeys.startswith(&#39;/&#39;):<br>
&gt; +            akeys = os.path.join(pwent.pw_dir, akeys)<br>
&gt;         authorized_keys = akeys<br>
&gt;     except Exception:<br>
&gt;         authorized_keys = &#39;%s/.ssh/authorized_keys&#39; % pwent.pw_dir<br>
&gt;<br>
&gt;<br>
&gt; How do you want to handle this?  Should I go ahead and file both RHBZ<br>
&gt; and LP issues for it?</p>
<p>If you&#39;re willing to, please do so. Otherwise I can forward a RHBZ bug to Launchpad.</p>
<p>Thanks for figuring this out!</p>