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