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