Re: help needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mar 31, 2012 6:44 AM, "Andy Grimm" <agrimm@xxxxxxxxx> 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
cloud@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/cloud

[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Big List of Linux Books]     [Yosemite News]     [Linux Apps]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]

  Powered by Linux